StrTrim

Removes unwanted spaces from a string.

Function Group Execution Windows Embedded Thin Client Mobile Access
StrTrim String Synchronous Supported Supported Supported Supported

Syntax

  StrTrim( strReference, optNumFlag )  
strReference
A string, or a tag of String type that contains the source string.
optNumFlag
An optional integer or tag of Integer type:
Value of optNumFlag Description
0 Removes all spaces from both the beginning and the end of the string.
1 Removes all spaces only from the beginning of the string.
2 Removes all spaces only from the end of the string.
3 Removes all spaces except for single spaces between words.
Note: If no value is given for optNumFlag, then 0 is the default.

Returned value

This function returns a string equal to strReferance minus the specified space characters. The returned value can be stored in any tag of String type.

Examples

Tag Name Expression
Tag StrTrim( ” Studio version 7.0 ” ) // Returned value = “Studio version 7.0″
Tag StrTrim( ” Studio version 7.0 “, 0 ) // Returned value = “Studio version 7.0″
Tag StrTrim( ” Studio version 7.0 “, 1 ) // Returned value = “Studio version 7.0 “
Tag StrTrim( ” Studio version 7.0 “, 2 ) // Returned value = ” Studio version 7.0″
Tag StrTrim( ” Studio   version  7.0 “, 3 ) // Returned value = “Studio version 7.0″

StrTrim