#Include Once "window9.bi"

Function InsertString(DestS As String,ByVal InsertS As String,ByVal Position As Long) As Long Export
	Dim As Long LenDest = Len(wstr(destS))
	If position=-1 Then	position=LenDest+1	
	If (LenDest+1)<Position or Position=0 Or position < -1 Then Return -1
	DestS = (Mid(wstr(DestS),1,Position-1)) & wstr(InsertS) & (Mid(wstr(DestS),Position))
	Return 0 
End Function
