ilan Expert Licensed User Longtime User Sep 21, 2016 #1 i am not sure if it is a bug what it seem like the trim function in b4i is not working code: B4X: Dim test1 As String = "ilan 123" Log(test1.Trim) log: ilan 123 Click to expand... the space should be removed when i call .trim, or am i wrong?
i am not sure if it is a bug what it seem like the trim function in b4i is not working code: B4X: Dim test1 As String = "ilan 123" Log(test1.Trim) log: ilan 123 Click to expand... the space should be removed when i call .trim, or am i wrong?
MikeH Well-Known Member Licensed User Longtime User Sep 21, 2016 #2 Trim takes space from the ends, not within the string
ilan Expert Licensed User Longtime User Sep 21, 2016 #3 MikeH said: Trim takes space from the ends, not within the string Click to expand... its says "leading or trailing" so i guess only if the space is in the start of the string or in the end. so only option for me would be B4X: .Replace(" ","")
MikeH said: Trim takes space from the ends, not within the string Click to expand... its says "leading or trailing" so i guess only if the space is in the start of the string or in the end. so only option for me would be B4X: .Replace(" ","")
MikeH Well-Known Member Licensed User Longtime User Sep 21, 2016 #4 ilan said: its says "leading or trailing" so i guess only if the space is in the start of the string or in the end. so only option for me would be B4X: .Replace(" ","") Click to expand... Yes, thats what I meant and yes, .replace is the answer.
ilan said: its says "leading or trailing" so i guess only if the space is in the start of the string or in the end. so only option for me would be B4X: .Replace(" ","") Click to expand... Yes, thats what I meant and yes, .replace is the answer.
S sorex Expert Licensed User Longtime User Sep 23, 2016 #5 right, it's leading and strailing from the entire string, not words inside the string.