Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
This routine is available starting with SIL Engine™2.0.2 for Jira 5.x or SIL Engine™ 1.1.9 for Jira 1.1.9.
Info
titleAvailability
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

trim(str)

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue
Returns a trimmed copy of the string passed as parameter with the leading and trailing whitespaces removed.

Returns a trimmed copy of the string passed as parameter with the leading and trailing whitespaces removed.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

str

...

String

Yes

String to trim.

Return

...

Type

stringString

Example

Code Block
string original = "   foobar   ";
string trimmed = trim(original);
print(">>" + original + "<<"); // will print ">>   foobar   <<"
print(">>" + trimmed + "<<");  // will print ">>foobar<<"

...

Note

This also works if the string passed in as parameter only has leading or trailing whitespaces. If the string has no leading or trailing whitespaces, a copy of the original string will be returned.

See also

Filter by label (Content by label)
showLabelsfalse
max10025
showSpacefalse
cqllabel = "string_routines" and space = currentSpace ( )
labelsstringarray_routines