Skip to content
Reference > Methods

strTrim(text)

Definition

String strTrim(String text)

Description

Returns a string with leading/trailing white space removed, including tabs, line returns. If there is no leading/trailing white space then the supplied string is returned unchanged.

Parameter Definition

Name Type Description
text String String to trim white space from

Examples

1
2
3
String r1 = strTrim("No Change!"); // r1 == No Change!
String r2 = strTrim(" Change \t\n\r  "); // r2 == Change
String r3 = strTrim("  "); // r3 ==