Returns the specified character expression with all leading and trailing blanks removed.
String.Trim()
Where:
String
Is a character expression based on the Character/VarChar/LongVarChar data type.
Type Returned:
Character
Data Types: Character,
VarChar,
LongVarChar
Generators: .NET,
.NET Framework,
Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)
Returns a character expression with all leading and trailing blanks removed.
By defining the following code in an Event:
&Text = ' My character expression '
&FinalText = &Text.Trim()
you will go from this:
&Text = ' My character expression '
to this:
&FinalText: 'My character expression'
See Also
Trim function
TrimEnd method
TrimStart method
Rtrim Function
Ltrim Function