Official Content

Returns the specified character expression with all leading and trailing blanks removed.

Syntax

String.Trim()

Where:

String
   
Is a character expression based on the Character/VarChar/LongVarChar data type.
  

Type Returned:
Character

Scope

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)

Description

Returns a character expression with all leading and trailing blanks removed.

Samples

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

   


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant