String Processing Logic

  

DEVELOPER

The following commands allow you to control string processing within a logic routine.  In-Line Substringing is a facility that may be used independently or in conjunction with logic commands to manipulate data.

These logic commands support strings of up to 2,000 bytes in length.

Logic Command

Description
 

IN-ALPHA

Tests if one string is within another string, on a byte-by byte basis.
 

INDEX

Returns the start position of one string within another string in bytes.
 

LEN

Determines the length of a string in bytes.
 

IN-ALPHA-NLS

Tests if one string is within another string by characters.
 

INDEX_NLS

Returns the start position of one string within another string in characters.
 

INDEX_UTF8

Find the UTF-8 character position of one string inside another where either may contains UTF-8 characters.

LEN-NLS

Determines the length of a string in characters.
 

LEN-SCREEN

Returns the length on the screen for a multiple-byte string.
 

LEN_UTF8

Counts the number of UTF-8 characters in a string.

UPPER_CASE

Converts a string into uppercase.
 

UPPER_CASE_UTF8

Converts a string to upper case respecting any UTF-8 characters it contains. If UTF-8 characters have upper case equivalents then these are used.

LOWER_CASE

Converts a string into lowercase.
 

LOWER_CASE_UTF8

Converts a string to lower case respecting any UTF-8 characters it contains. If UTF-8 characters have lower case equivalents then these are used.

MIXED_CASE

Converts to Mixed Case (First letter capitalised and the rest changed to lower case).
 

MIXED_CASE_UTF8

Converts a string to mixed case respecting any UTF-8 characters it contains. If UTF-8 characters have mixed case equivalents then these are used.

STRCOMP

Compares two strings in either case sensitive or insensitive mode.
 

SUBSTR_UTF8

Take a substring from another string treating it as UTF-8 characters.

TRIM

Removes specified characters from a string.
 

TRIML

Removes leading spaces from a string.
 

TRIMR

Removes trailing spaces from a string.
 

CHANGE

Replaces all occurrences of a sub-string within the source string with the replacement sub-string.
 

TOKEN
 

Can be used iteratively to return the string delimited by a list of delimiters.
 

SQUOTE

Envelops a string with single quote characters.
 

DQUOTE

Envelops a string with double quote characters.
 

XQUOTE

Envelops a string with a specified character or the first character in the specified string.
 

Comment on this topic

Topic ID: 520152