iOS Equivalent Of Trim

I was wondering if there was an iOS replacement for Trim. I am trying to eliminate any blank spaces before a string in a textbook.

Never mind. It does work. I was getting errors before. This works. Sorry for the post.

Dim t As Text = txt2
t = t.TrimLeft
txt2=T

@James Redway
Here you go mate:

http://developer.xojo.com/text$Trim

Trim As Text
Trims whitespace, as defined in the Unicode standard, from the beginning and end of the text. If the value is empty or consists entirely of whitespace, an empty Text is returned.
Sample Code

Removes beginning and ending white space:
Dim t As Text = " Hello, World! "
t = t.Trim ’ t = “Hello, World!”
TrimLeft As Text
Trims whitespace, as defined in the Unicode standard, from the beginning. If the value is empty or consists entirely of whitespace, an empty Text is returned.
Sample Code

Removes beginning white space:
Dim t As Text = " Hello, World! "
t = t.TrimLeft ’ t = “Hello, World! "
TrimRight As Text
Trims whitespace, as defined in the Unicode standard, from end of the text. If the value is empty or consists entirely of whitespace, an empty Text is returned.
Removes ending white space:
Dim t As Text = " Hello, World! "
t = t.TrimRight ’ t = " Hello, World!”

Thanks Bogdan,

I was using Trim in an SQL Query and it was causing an error, so I assumed incorrectly it did not work in the iOS framework, which of course it does. I also did see that page in the documentation. Thanks for taking the time to help. I appreciate it.

James, I’m learning the differences in Xojo language. After reading:
https://documentation.xojo.com/index.php/Trim
http://developer.xojo.com/text$Trim

I think there is a Trim that work with String, trim(stringvalue), but if you have the text assigned you can use text.trim