U
unba1300
Guest
Sorry, this will be an easy answer for some, but I'm still learning.
I need to check if a string variable ends with "s", and if it does, remove the "s". I have the check working with EndsWith, but not the replacement.
Tried this:
Thanks.
I need to check if a string variable ends with "s", and if it does, remove the "s". I have the check working with EndsWith, but not the replacement.
Tried this:
B4X:
varFood(0) = varFoods(0).Replace(LastIndexOf("s"),"")
'and
varFood(0) = varFoods(0).SubString2(0, LastIndexOf("s"))