String Functions

Function

Returns

AnsiToUtf8

Converts a string encoded in the ANSI character format to UTF-8.

Append

The concatenation of two strings.

ASCII

The ASCII value of a character.

Center

A string of specified length with spaces added to, or characters truncated from, both sides so that the content is centered.

Character

The character corresponding to a specified ASCII number.

Cstring

Translates a zero terminated c-string to a standard DataFlex string.

CStringLength

Returns the number of code-units in a null terminated UTF-8 CString

CStringSize

Returns the number of bytes in a null terminated CString.

Eval

Calls an evaluation engine to evaluate an expression that is passed as a string. The result of this evaluation is returned.

FillString

Creates a String of specified length filled with a specific character.

FormatCurrency

Formats a number and returns it as a string formatted as a currency value.

FormatNumber

Formats a number and returns it as a string formatted as a number using locale number settings.

FormatValue

Formats a number with a custom formatting mask.

Insert

A string made up of one string inserted into another at a specified point.

Left

The leftmost characters of a passed string up to a specified length.

Length

The length of a string.

Lowercase

The passed string with all letters converted to lower case.

Ltrim

The passed string with all leading spaces removed.

Mid

A substring derived from the passed value starting at a specified position and of specified length.

NormalizeString

Returns a normalized copy of the passed String.

OemToUtf8

Converts a string encoded in the OEM character format to UTF-8.

OemToUtf8Buffer

Converts an OEM string to UTF-8.

Overstrike

A string whose value contains a passed substring at a specified location. The substring will overwrite any characters in the original string at the specified location.

Pad

A string of specified length with spaces added to, or truncated from, the right of a passed string.

PointerToString

Converts a pointer to a string in memory into a string.

PointerToWString

Converts a pointer to a WString (or Char array with two bytes per character) to a WString.

Pos

Returns the ordinal position of the first occurrence a substring in a host string or 0 (zero) if the substring is not found.

Remove

A string consisting of the passed string with a specified number of characters removed at a specified location in the string.

Repeat

A string made up of a specified number of repetitions of the passed string.

Replace

A string with the first occurrence of one passed substring replaced with another.

Replaces

A string with all occurrences of one passed substring replaced with another.

Right

The rightmost characters of a passed string up to a specified length.

RightPos

RightPos returns the ordinal position of the last occurrence of a substring in a host string or 0 (zero) if the substring is not found.

Rtrim

The passed string with all trailing spaces removed.

SFormat

Creates a formatted string by replacing markers in a host string (%1, %2, etc.) with sub-string values.

SizeOfString

Returns the size of a string in bytes (UTF-8 code-units).

SizeOfWString

Returns the number of WChars (codeunits / double-bytes) of a WString.

StrJoinFromArray

Appends contents of elements of a String array to a single String.

StrSplitToArray

Splits the contents of a single String into the elements of a String array.

StringToUCharArray

Copies a DataFlex string to a UChar array.

ToANSI

Converts a string from the OEM character set to the ANSI character set.

ToOEM

Converts a string from the ANSI character set to the OEM character set.

Trim

The passed string with all leading and trailing spaces removed.

Uppercase

The passed string with all letters converted to upper case.

UCharArraytoString

Returns a DataFlex string which is a copy of the passed UChar array.

UCharArrayToWString

Returns a DataFlex WString which is a copy of the passed UChar array.

UCharToString

Returns a DataFlex string which is a copy of the passed UChar.

Utf8ToAnsi

Converts a string to the ANSI character format.

Utf8ToOem

Converts a string to the OEM character format.

Utf8ToOemBuffer

Converts a UTF-8 string to OEM.

WStringToUCharArray

Copies a DataFlex WString to a UChar array

ZeroString

Creates a String filled with 0 of specified length.