Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim AString, BString As String
Dim c As Int
Dim flag As Boolean
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
AString="abcd efghnbsp"
Log("A=" & AString)
For c=0 To AString.Length-1
Select AString.SubString2(c,c+1)
Case "&" OR "n" OR "b" OR "s" OR "p" OR ";"
If AString.SubString2(c,c+1)="&" Then
flag=True
End If
If flag=True Then
BString=BString+""
Else
BString=BString+AString.SubString2(c,c+1)
End If
If AString.SubString2(c,c+1)=";" AND flag=True Then
flag=False
End If
Case Else
BString=BString+AString.SubString2(c,c+1)
End Select
Next
Log("B=" & BString)
End Sub