Hello all
I used this code to split a statement to words and detect the words that begin with, or end with (.) or (,) or the (.) and (,) themselves:
but this code doesn't recognize the word if it is in the end of the line.
I used this code to split a statement to words and detect the words that begin with, or end with (.) or (,) or the (.) and (,) themselves:
B4X:
Dim sf As StringFunctions
sf.Initialize
dim m,n as string
m="Charles Dickens was born on 7th February 1812. The Dickens family lived near Portsmouth, on the south coast of England. Later the family lived in London."
m=m & crlf & "Dickens had three brothers and three sisters. He was a small, thin boy. And he was often ill."
Dim ls As List
ls = sf.Split(m, " ")
for i=0 to ls.size-1
n=ls.get(i)
If n="." Or n="," Or n.StartsWith(".") Or n.StartsWith(",") Or n.EndsWith(",") Or n.EndsWith(".") Then
msgbox(n,"")
End If
next
but this code doesn't recognize the word if it is in the end of the line.