String.Trim

Top  Previous  Next

 

Syntax

function String.Trim(Str: string): string

 

Alternative Names

ibec_Trim

 

Description

Removes leading and trailing spaces and control characters from string Str and returns what's left.

 

See also

String.TrimLeft
String.TrimRight

 

Example

execute udsblock

as

begin

  strvalue = '  < spaces here and spaces there >  ';

  

  /* shows value with leading and trailing spaces removed */

  GUI.ShowMessage('Trimmed >>' || String.Trim(strvalue) || '<<');

 

  /* shows value with leading spaces removed */

  GUI.ShowMessage('Trimleft >>' || String.TrimLeft(strvalue) || '<<');

 

  /* shows value with trailing spaces removed */

  GUI.ShowMessage('Trimright >>' || String.TrimRight(strvalue) || '<<');

end