Module :
lang.string
Module Overview
This module provides lang library string operations defined by the language specification 2020R1.
codePointCompare |
Lexicographically compares strings using their Unicode code points. This orders strings in a consistent and well-defined way, but the ordering will often not be consistent with cultural expectations for sorted order. |
concat |
Concatenates zero or more strings. |
endsWith |
Tests whether a string ends with another string. |
equalsIgnoreCaseAscii |
Tests whether two strings are the same, ignoring the case of ASCII characters. A character in the range a-z is treated the same as the corresponding character in the range A-Z. |
fromBytes |
Constructs a string from its UTF-8 representation in |
fromCodePointInt |
Constructs a single character string from a code point. An int is a valid code point if it is in the range 0 to 0x10FFFF inclusive, but not in the range 0xD800 or 0xDFFF inclusive. |
fromCodePointInts |
Constructs a string from an array of code points. An int is a valid code point if it is in the range 0 to 0x10FFFF inclusive, but not in the range 0xD800 or 0xDFFF inclusive. |
getCodePoint |
Returns the code point of a character in a string. |
indexOf |
Finds the first occurrence of one string in another string. |
iterator |
Returns an iterator over the string. The iterator will yield the substrings of length 1 in order. |
join |
Joins zero or more strings together with a separator. |
lastIndexOf |
Finds the last occurrence of one string in another string. |
length |
Returns the length of the string. |
startsWith |
Tests whether a string starts with another string. |
substring |
Returns a substring of a string. |
toBytes |
Represents |
toCodePointInt |
Converts a single character string to a code point. |
toCodePointInts |
Converts a string to an array of code points. |
toLowerAscii |
Converts occurrences of A-Z to a-z. Other characters are left unchanged. |
toUpperAscii |
Converts occurrences of a-z to A-Z. Other characters are left unchanged. |
trim |
Removes ASCII white space characters from the start and end of a string. The ASCII white space characters are 0x9...0xD, 0x20. |