Versions Compared

Key

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

...

Code Block
languagecpp
themeConfluence
FUNCTION xpfTrimString (actualString  : STRING; --
actual string to be trimmed                            prefixChars   : STRING; --
optional; used in the TRIM_STRING_PREFIX option
                        suffixChars   : STRING; -- optional; used in
the TRIM_STRING_SUFFIX option                         options       : INTEGER)
                        trimmedString : STRING;   -- resulting
trimmed string               
 

Use this function to ....

Arguments

Insert excerptUS:_a_actualStringUS:_a_actualStringnopaneltrue Insert excerptUS:_a_prefixCharsUS:_a_prefixCharsnopaneltrue Insert excerptUS:_a_suffixCharsUS:_a_suffixCharsnopaneltrue Insert excerptUS:_a_optionsUS:_a_optionsnopaneltrueThis function will trim a string according to the given specification.The xpfTrimString() function has a variable number of arguments, i.e., it can be invoked with minimum 1 argument and maximum 4 arguments.

Arguments

...

 

 TypeNameComment
STRING
actualString
The actual string to be trimmed
STRING
prefixCharsOptional argument. Default is INDETERMINATE (?). This argument specifies a set of characters that will be used in trimming the start (prefix) of the actualString. This argument is only effective when the option xpxTRIM_STRING_PREFIX is specified.
STRING
suffixCharsOptional argument. Default is INDETERMINATE (?). This argument specifies a set of characters that will be used in trimming the end (suffix) of the actualString. This argument is only effective when the option xpxTRIM_STRING_SUFFIX is specified.
INTEGER
optionsOptional argument. Default value is INDETERMINATE (?). Specifies the suffix of each substring. This suffix will be removed in the string splitting operation.

Return Value

...

 

Insert excerpt
US:_r_trimmedString
US:_r_trimmedString
nopaneltrue

Options

...

Insert excerpt
US:_o_XPX_TRIM_STRING_PREFIX_ALL_NON_PRINTABLE_CHARS_XPX
US:_o_XPX_TRIM_STRING_PREFIX_ALL_NON_PRINTABLE_CHARS_XPX
nopaneltrue
Insert excerpt
US:_o_XPX_TRIM_STRING_SUFFIX_ALL_NON_PRINTABLE_CHARS_XPX
US:_o_XPX_TRIM_STRING_SUFFIX_ALL_NON_PRINTABLE_CHARS_XPX
nopaneltrue
Insert excerpt
US:_o_XPX_TRIM_STRING_SUFFIX_XPX
US:_o_XPX_TRIM_STRING_SUFFIX_XPX
nopaneltrue
Insert excerpt
US:_o_XPX_TRIM_STRING_PREFIX_XPX
US:_o_XPX_TRIM_STRING_PREFIX_XPX
nopaneltrue
Insert excerpt
US:_o_XPX_TRIM_STRING_PREFIX_WHITE_SPACE_XPX
US:_o_XPX_TRIM_STRING_PREFIX_WHITE_SPACE_XPX
nopaneltrue
Insert excerpt
US:_o_XPX_TRIM_STRING_SUFFIX_WHITE_SPACE_XPX
US:_o_XPX_TRIM_STRING_SUFFIX_WHITE_SPACE_XPX
nopaneltrue

 

Example

<example missing>

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "string" and parent = "5636522"

 

 xpfTrimString

...

-- This removes all leading and trailing white spaces

trimmed_string := xpfTrimString(mystring,?,?,xpxTRIM_STRING_PREFIX_WHITE_SPACE

...

~| xpxTRIM_STRING_SUFFIX_WHITE_SPACE

...

)

...

;   

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "string" and parent = "5636522"