Hello guys,
I have a TextField that collects String,
Like if I write at the TextField "Hello" and press the button,
It will be like wordOne = TextField.text
I need to check if the string ends with WhiteSpace,
If yes, remove it and present to the user the wordOne without the space, at the TextField,
And if not, to show the user the wordOne without any change, at the TextField.
Example: if I have string "hey. ", I want to show to the user "hey."
Someone can tell me how can I do it?
One more question - How do I capitalize the first word at the sentence? (With code)
Example: "hello" = "Hello".
Thanks,
Tal Shani
I have a TextField that collects String,
Like if I write at the TextField "Hello" and press the button,
It will be like wordOne = TextField.text
I need to check if the string ends with WhiteSpace,
If yes, remove it and present to the user the wordOne without the space, at the TextField,
And if not, to show the user the wordOne without any change, at the TextField.
Example: if I have string "hey. ", I want to show to the user "hey."
Someone can tell me how can I do it?
One more question - How do I capitalize the first word at the sentence? (With code)
Example: "hello" = "Hello".
Thanks,
Tal Shani