Previous Topic: Date-Time Stamp FunctionsNext Topic: Trailing-Sign Functions


String Functions

String built-in functions perform operations on string values and return either string or numeric values.

Function

Keyword

What it does

Concatenate

CONCATENATE

Returns the concatenation of a specified list of string values

Extract

EXTRACT

Returns the string that results from removing leading and trailing spaces from a string value

Fixed-length string

FIX

Converts a string to a fixed-length character variable

Index

STRING-INDEX

Returns the starting position of a specified string within a string value

Initial cap

INITCAP

Capitalizes the first letter of a string

Insert

INSERT

Returns the string that results from inserting a specified string into a string value starting at a specified position

Left justify

LEFT-JUSTIFY

Returns the string that results from left justifying a string value

Length

STRING-LENGTH

Returns the length of a string value

Like

LIKE

Returns TRUE or FALSE to indicate whether a source string matches a given pattern string

Lowercase

TOLOWER

Converts a string to lowercase characters

Repeat

STRING-REPEAT

Returns the string that results from repeating a string value a specified number of times

Replace

REPLACE

Returns a string that results from replacing, in a string value, each occurrence of a specified string by another specified string

Right justify

RIGHT-JUSTIFY

Returns the string that results from right justifying a string value

Substring

SUBSTRING

Returns the substring of a string value, starting from a specified position, and continuing for a specified length

Uppercase

TOUPPER

Converts a string to uppercase characters

Translate

TRANSLATE

Returns the string that results from translating characters in a string value that also occur in a selection string, to corresponding characters in a substitution string

Verify

VERIFY

Returns the position of the first character in a string value that does not occur in a second specified string

Word cap

WORDCAP

Capitalizes the first character in each word in a string