Forum Discussion
Dmitry_Nikolaev
Staff
15 years agoHi Rishi,
The aqString.Trim method unequivocally removes the spaces. There is no need to verify it.
However, you can use aqString.StrMatches. The below code posts True to the test log if there are leading spaces (the first line) or trailing spaces (the second line), and False otherwise.
The aqString.Trim method unequivocally removes the spaces. There is no need to verify it.
However, you can use aqString.StrMatches. The below code posts True to the test log if there are leading spaces (the first line) or trailing spaces (the second line), and False otherwise.
Log.Message(aqString.StrMatches("^\b+.+", text))
Log.Message(aqString.StrMatches(".+$\b+", text))