Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleAvailability

This routine is available since starting with katl-commons 2.0.2 ( for JIRA Jira 5.x ) or katl-commons 1.1.9 ( for JIRA Jira 1.1.9) .

Syntax

...

trim(str)

Description

...

Excerpt

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

Parameters

...

Parameter name

Type

Required

Description

str

string

Yes

The string to trim.

Return type

...

string

Example

...

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

 

Notes

...

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
max100
showSpacefalse
cqllabel = "string_routines"
labelsstring_routines