StringUtf8 Methods

The methods defined in the StringUtf8 primitive type are summarized in the following table.

Method Description
asANSI Returns ANSI String values as Binary values in a Unicode environment
asDate Returns a date based on the contents of the receiving UTF8 string
asPlainText Returns a string with a character entity escape sequence replacing each non-US-ASCII character
asString Returns multiple-byte or code page-sensitive values as String values in an ANSI environment
bufferMemoryAddress Returns the value of the pointer to the internal buffer as a memory address
byteOffsetFromCharacterIndex Returns the byte offset for a specified index of a character within the receiving UTF8 string
characterIndexFromByteOffset Returns the index of a character for a specified byte offset within the receiving UTF8 string
compareEql Returns true if the receiver is equal to a specified UTF8 string
compareGeneric Returns an integer showing if the receiver is greater than, equal to, or less than a UTF8 string
compareGeq Returns true if the receiver is greater than or equal to a specified UTF8 string
compareGtr Returns true if the receiver is greater than a specified UTF8 string
compareLeq Returns true if the receiver is less than or equal to a specified UTF8 string
compareLss Returns true if the receiver is less than the value of a specified UTF8 string
compareNeq Returns true if the receiver is not equal to a specified UTF8 string
compressToBinary Returns a compressed binary representation of a UTF8 string
display Returns the receiver encoded in the character set of the default code page for the current locale
firstCharToLower Converts an uppercase first character in the receiving UTF8 string to lowercase
firstCharToUpper Converts a lowercase first character in the receiving UTF8 string to uppercase
isValid Returns true if the receiver represents a valid UTF8 string
length Returns the current number of characters in the receiver
maxLength Returns the declared maximum number of characters in the receiver
padBlanks Returns a copy of the receiving string padded to the specified length with trailing blanks (spaces)
padLeadingZeros Returns a copy of the receiving string padded to the specified length with leading zeros
pos Returns an integer containing the character index of the start of a UTF8 substring in the receiver
posUsingByteOffset Returns an integer containing the byte offset of the start of a UTF8 substring in the receiver
replaceChar Replaces all occurrences of a character with another character
reverse Returns a UTF8 string containing the reversed characters in the receiving UTF8 string
reversePos Returns the position of the last occurrence of a substring in the receiving UTF8 string
reversePosIndex Returns the position of the last occurrence of a substring within a substring of the UTF8 string
scanUntil Returns a substring of the receiving UTF8 string starting from the specified index up to (but not including) the first occurrence of any of the specified characters
scanWhile Returns a substring of the receiving UTF8 string starting from the specified index up to (but not including) the first occurrence of any character other than the specified characters
size Returns the number of bytes required to store the receiver excluding the end-of-string character
substringAtByteOffset Returns a UTF8 substring with a specified length starting with the character at a specified byte offset
toLower Returns a copy of the receiving UTF8 string with all uppercase characters converted to lowercase
toUpper Returns a copy of the receiving UTF8 string with all lowercase characters converted to uppercase
trimBlanks Returns a copy of the receiving UTF8 string with blanks (spaces) trimmed from both ends of the receiver
trimLeft Returns a copy of the receiving UTF8 string with the leading blanks (spaces) removed
trimRight Returns a copy of the receiving UTF8 string with trailing blanks (spaces) trimmed from the end of receiver