SHIP:Sail:Node Functions

From Serious Documentation
Jump to: navigation, search
Function Returns Introduced Description
charAt String v4.0 Returns the single character string extracted from a specified index in another string. This is a simplified version of subStr and provided for completeness in the API.
codepointAt Integer v4.0 Returns the Unicode-16 codepoint (or ASCII numeric value for characters in the ASCII range) of a character at a specified index in a String.
codepointToString String v4.0 Returns a single character string for the specified Unicode-16 codepoint. If the Codepoint is invalid, the string is empty.
indexOf Integer v4.0 Returns the index of the first found occurrence (if any) of a substring within another string, optionally starting at a specified offset. If the substring is not found, -1 is returned.
lastIndexOf Integer v4.0 Returns the index of the last found occurrence (if any) of a substring within another string, optionally starting at a specified offset. If the substring is not found, -1 is returned.
length Integer v2.0 Returns the length in characters (not bytes) of a string.
subStr String v2.0 Returns the N-character substring of a string starting at an index.
subString String v2.0 Returns the substring of a string starting at an index and (optionally) ending before an index.
toLowerCase String v2.0 Replaces any ASCII upper case letters with lower case equivalents in a string.
toUpperCase String v2.0 Replaces any ASCII lower case letters with upper case equivalents in a string.
toString String v2.0 Converts an Integer or Float to a string. Options include leading 0 padding, radix, and precision.

See Also: