[−][src]Module boa::builtins::string
The global String
object
Functions
call_string | Call new string [[Call]] https://tc39.es/ecma262/#sec-string-constructor-string-value |
char_at | Returns a single element String containing the code unit at index pos within the String value resulting from converting this object to a String. If there is no element at that index, the result is the empty String. The result is a String value, not a String object. https://tc39.es/ecma262/#sec-string.prototype.charat |
char_code_at | Returns a Number (a nonnegative integer less than 216) that is the numeric value of the code unit at index pos within the String resulting from converting this object to a String. If there is no element at that index, the result is NaN. https://tc39.es/ecma262/#sec-string.prototype.charcodeat |
concat | Returns a String that is the result of concatenating this String and all strings provided as arguments https://tc39.es/ecma262/#sec-string.prototype.concat |
create_constructor | Create a new |
ends_with | Returns a Boolean indicating whether the sequence of code units of the "search string" is the same as the corresponding code units of this string starting at position "end position" - length https://tc39.es/ecma262/#sec-string.prototype.endswith |
includes | Returns a Boolean indicating whether searchString appears as a substring of the result of converting this object to a String, at one or more indices that are greater than or equal to position. If position is undefined, 0 is assumed, so as to search all of the String. https://tc39.es/ecma262/#sec-string.prototype.includes |
index_of | If searchString appears as a substring of the result of converting this object to a String, at one or more indices that are greater than or equal to position, then the smallest such index is returned; otherwise, -1 is returned. If position is undefined, 0 is assumed, so as to search all of the String. https://tc39.es/ecma262/#sec-string.prototype.includes |
init | Initialise the |
last_index_of | object to a String at one or more indices that are smaller than or equal to position, then the greatest such index is returned; otherwise, -1 is returned. If position is undefined, the length of the String value is assumed, so as to search all of the String. https://tc39.es/ecma262/#sec-string.prototype.lastindexof |
make_string | Create new string [[Construct]] https://searchfox.org/mozilla-central/source/js/src/vm/StringObject.h#19 |
match | Returns an array whose contents is all the results matching the regular expression, if the global (g) flag is present, in its absence, only the first complete match and its related capturing groups is returned, otherwise null is returned if no match is found. https://tc39.es/ecma262/#sec-string.prototype.match |
match_all | TODO: update this method to return iterator Returns an array* of all results matching a string against a regular expression, including capturing groups https://tc39.es/ecma262/#sec-string.prototype.matchall |
pad_end | String.prototype.padEnd ( maxLength [ , fillString ] ) |
pad_start | String.prototype.padStart ( maxLength [ , fillString ] ) |
repeat | Returns a String that is the result of repeating this String the number of times given by the first argument https://tc39.es/ecma262/#sec-string.prototype.repeat |
replace | |
slice | Returns a String which contains the slice of the JS String from character at "start" index up to but not including character at "end" index https://tc39.es/ecma262/#sec-string.prototype.slice |
starts_with | Returns a Boolean indicating whether the sequence of code units of the "search string" is the same as the corresponding code units of this string starting at index "position" https://tc39.es/ecma262/#sec-string.prototype.startswith |
substr | Return a String which is a subset of the String value resulting from converting this object to a String. The subset of the string starts at the start index and is at most length code units long, depending if the string is shorter. When only the start index is specified, the length become the length of the string. When the start index is negative, the start index become the number of code units from the end of the string. When no argument is specified, the returned String is the same as the original https://tc39.es/ecma262/#sec-string.prototype.substr |
substring | Return a String which is a subset of the String value resulting from converting this object to a String. The subset of the string is contained between the start index and the end index. When both the start and end arguments are specified, the smaller one represent the index of the code unit from which the returned String will start and the larger one the index of the code unit just after the end. When only the start index is specified, the end index defaults to being the length of the string. When no argument is specified, the returned String is the same as the original https://tc39.es/ecma262/#sec-string.prototype.substring |
to_lowercase | Return a String with every code point mapped to its corresponding lowercase equivalent. With the current implementation the string is always copied even if the resulting String is identical https://tc39.es/ecma262/#sec-string.prototype.tolowercase |
to_string | Get the string value to a primitive string |
to_uppercase | Return a String with every code point mapped to its corresponding uppercase equivalent. With the current implementation the string is always copied even if the resulting String is identical https://tc39.es/ecma262/#sec-string.prototype.touppercase |
trim | |
trim_end | |
trim_start | |
value_of | Get the string value to a primitive string https://tc39.es/ecma262/#sec-string.prototype.valueof |