String Methods

The methods defined in the String 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 from the receiving string
asGuid Returns a binary representation based on the class identifier (clsid) of the receiving string
asObject Returns an object reference based on the contents of the oid-like receiving string and an optional lifetime indication
asOid Returns an object reference based on the contents of the receiving string
asStringUtf8 Returns a locale-sensitive conversion of the receiving string in UTF8 format
asUuid Returns a binary by formatting the string as a Universally Unique Identifier (UUID)
base64Decode Returns a binary value resulting from decoding a Base64-encoded message
bufferAddress Returns the value of the pointer to the internal buffer as an integer
bufferMemoryAddress Returns the value of the pointer to the internal buffer as a memory address
compareEql Returns true if the receiver is equal to a specified string
compareGeneric Returns an integer showing if the receiver is greater than, equal to, or less than a specified character
compareGeq Returns true if the receiver is greater than or equal to a specified string
compareGtr Returns true if the receiver is greater than a specified string
compareLeq Returns true if the receiver is less than or equal to a specified string
compareLss Returns true if the receiver is less than the value of a specified string
compareNeq Returns true if the receiver is not equal to a specified string
compressToBinary Returns a compressed binary representation of the receiver
display Returns a string containing the receiver
fillString Fills the receiving string with the specified string
firstCharToLower Converts an uppercase first character in the receiving string to lowercase
firstCharToUpper Converts a lowercase first character in the receiving string to uppercase
getHugeTokens Returns an array of the tokens not greater than 2047 characters in the receiver
getNextToken Returns the next token in the receiver
getTokens Returns an array of the tokens not greater than 62 characters in the receiver
isByte Returns true if the receiver is a string representation of a valid byte value
isDecimal Returns true if the receiver is a string representation of a valid decimal value
isInteger Returns true if the receiver is a string representation of a valid integer value
isInteger64 Returns true if the receiver is a string representation of a valid 64-bit integer value
isReal Returns true if the receiver is a string representation of a valid real number
length Returns the current length of a string variable or attribute
makeString Returns a string of the specified length filled with the value of the receiver
makeXMLCData Returns a new string of the receiver prepended with <![CDATA[ and appended with ]]>
maxLength Returns the declared maximum length of a string variable
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
plainTextToStringUtf8 Returns a UTF8 string with escaped character sequences replaced by UTF8 characters
pos Returns an integer containing the position of a substring in the receiver
replace__ Returns a copy of the receiver string with all occurrences of the specified target substring replaced with the specified replacement string
replaceChar Replaces all occurrences of a character with another character
replaceFrom__

Returns a copy of the receiver string with only the first occurrence of the specified target substring replaced with the specified replacement substring, starting from the specified startIndex parameter

reverse Returns a string containing the reversed characters in the receiving string
reversePos Returns the position of the last occurrence of a substring in the receiving string
reversePosIndex Returns the position of the last occurrence of a substring within a substring of the receiving string
scanUntil Returns a substring of the receiving 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 string starting from the specified index up to (but not including) the first occurrence of any character other than the specified characters
toLower Returns a copy of the receiving string with all uppercase characters converted to lowercase
toUpper Returns a copy of the receiving string with all lowercase characters converted to uppercase
trimBlanks Returns a copy of the receiving string with blanks (spaces) trimmed from both ends of the receiver
trimLeft Returns a copy of the receiving string with the leading blanks (spaces) removed
trimRight Returns a copy of the receiving string with trailing blanks (spaces) trimmed from the end of the receiver