From Clomosy Docs

No edit summary
No edit summary
 
Line 30: Line 30:
<h2> See Also </h2>
<h2> See Also </h2>
* [[System_Library#String_Functions | String Functions]]
* [[System_Library#String_Functions | String Functions]]
{{#seo:|title=Trim Using in Clomosy - Clomosy Docs}}
{{#seo:|description=Trim removes leading and trailing spaces and control characters from a string, ensuring clean text for further processing.}}
{{#seo:|description=Trim removes leading and trailing spaces and control characters from a string, ensuring clean text for further processing.}}

Latest revision as of 13:53, 24 December 2024

Trims leading and trailing spaces and control characters from a string.
Trim removes leading and trailing spaces and control characters from the given string S.

Use TrimLeft or TrimRight to limit the operation to just one end of the string.

Example

const
  textValue = '      Letters     ';
{
  ShowMessage('/'+TrimLeft(textValue)+'/');
  ShowMessage('/'+TrimRight(textValue)+'/');
  ShowMessage('/'+Trim(textValue)+'/');
}

Output:

See Also