i need to test some strings for the occurrence of commas ful stops and even erroneous double spaces.
I am using this code
Which is very inelegant and will be cumbersome to say the least. Is there a better way to search for a sting of 'bad' charcters or ascii codes and replace them initially with a space and then do a check for replacing double/triple spaces with a single space?
Thanks
I am using this code
B4X:
st=edtName.Text
If st.Contains(",")=True Then
st=st.Replace(","," ")
End If
If st.Contains(" ")=True Then
st=st.Replace(" "," ")
End If
Which is very inelegant and will be cumbersome to say the least. Is there a better way to search for a sting of 'bad' charcters or ascii codes and replace them initially with a space and then do a check for replacing double/triple spaces with a single space?
Thanks