Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
languagecpp
themeConfluence
FUNCTION xpxTrimString (VAR actualString : STRING;
                        prefixChars      : STRING;
                        suffixChars      : STRING;
                        options          : INTEGER)
                        status           : INTEGER;
                

This function will trim a string according to the given specification. The actualString will be overwritten by the resulting string.

Arguments

...

Insert excerptUS:_a_actualStringUS:_a_actualStringnopaneltrue Insert excerptUS:_a_prefixCharsUS:_a_prefixCharsnopaneltrue Insert excerptUS:_a_suffixCharsUS:_a_suffixCharsnopaneltrue Insert excerptUS:_a_options_XPXUS:_a_options_XPXnopaneltrue 

TypeNameComment
STRING
actualString 
On input:   the untrimmed string. On output: the trimmed string.
STRING
prefixCharsDefault 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. The default value is "xpxTRIM_STRING_PREFIX_ALL_NON_PRINTABLE_CHARS ~| xpxTRIM_STRING_SUFFIX_ALL_NON_PRINTABLE_CHARS ~| xpxTRIM_STRING_PREFIX_WHITE_SPACE ~| xpxTRIM_STRING_SUFFIX_WHITE_SPACE"

Return Value

...

 

Insert excerpt
US:_r_XPX_Return_Value
US:_r_XPX_Return_Value
nopaneltrue

Options

...

...

1OptionComment
2
xpxTRIM_STRING_PREFIX_ALL_NON_PRINTABLE_CHARS

...


All non printable characters in the beginning of the given string will be removed. Non printable characters are defined to be the characters with the following ASCII value intervals: 1 - 31, 127 - 160

3xpxTRIM_STRING_SUFFIX_ALL_NON_PRINTABLE_CHARS

...

All non printable characters in the end of the given string will be removed
4xpxTRIM_STRING_SUFFIX

...

The set of characters specified in the "suffixChars" argument will be removed from the end of the given string
5xpxTRIM_STRING_PREFIX

...

The set of characters specified in the "prefixChars" argument will be removed from the start of the given string
6xpxTRIM_STRING_PREFIX_WHITE_SPACE

...

Remove all spaces at the beginning of the string
7xpxTRIM_STRING_SUFFIX_WHITE_SPACE

...

 

Example

...

Remove all spaces at the end of the string

Example

...

Code Block
languagecpp
<Missing Example>

 

See also

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

...