SHIP:Sail:String Functions

From Serious Documentation
Jump to: navigation, search
Function Returns Introduced Description
atod Double v5.1.0 Parses a String to get a Double from it
atof Float v5.0.120 Parses a String to get an Float from it
atoi Integer v5.0.120 Parses a String to get an Integer from it
atol Long v5.1.0 Parses a String to get an Long from it
bytesToString String v5.0.207 Builds a string from the ASCII bytes of an Integer, Short, or Byte until a 0x00 byte is encountered or the number of bytes of the size of the object are consumed. Optionally, non-printable characters can be replaced as-encountered. All byte orderings are supported.
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.
search Boolean v5.1.0 Implementation not complete.
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: