#include once "window9.bi"

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