Hi,
I encountered a problem with handling some characters from the string.
My code is:
text="abcd,.();-_"
If StrLength(text)>0 Then
i=0
Do Until i=StrLength(text)-1
If IsPunctuation (StrAt(text,i)) = True OR StrAt(text,i)=")" Then text=StrRemove (text ,i , 1)
If i<StrLength(text)-1 Then i=i+1
Loop
End If
listbox1.Add(text)
As a result I obtained "abcd.)-_"
How can I dispose of characters ".)-_" from this text?
Please :sign0085:
Greg
UPDATE:
There is a mistake in my code ... after deleting char it is moving to next position in text and in consequence , "next char" is being omitted.
I solved it in following way:
text="abcd,.();-_"
If StrLength(text)>0 Then
i=0
Do
If IsPunctuation (StrAt(text,i)) = True OR StrAt(text,i)=")" Then
text=StrRemove (text ,i , 1)
else
If i<StrLength(text) Then i=i+1
End If
Loop Until i=StrLength(text)
End If
listbox1.Add(text)