Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Dim strin As String = "abc" & Chr(0) & "defghijklmnopq"
Msgbox(substitute(strin,Chr(0),"x"),"")
End Sub
Sub substitute(chain As String, search As String, replaced As String)
If chain.IndexOf(search) = 0 Then Return
Dim gauche, droite As String
Do While chain.IndexOf(search)>0
chain = chain.substring2(0,chain.IndexOf(search)) & replaced & _
chain.SubString(chain.IndexOf(search)+search.Length)
Loop
Return chain
End Sub