@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="String")
public class JsString
extends JsObject
| Constructor and Description |
|---|
JsString() |
JsString(java.lang.String str) |
| Modifier and Type | Method and Description |
|---|---|
@JsNonNull java.lang.String |
charAt(int index)
The String object's charAt() method returns a new string consisting of the single UTF-16 code unit located at the specified offset into the string.
|
int |
charCodeAt()
The charCodeAt() method returns an integer between 0 and 65535 representing the UTF-16 code unit at the given index.
|
int |
charCodeAt(int index)
The charCodeAt() method returns an integer between 0 and 65535 representing the UTF-16 code unit at the given index.
|
int |
codePointAt(int index)
The codePointAt() method returns a non-negative integer that is the Unicode code point value at the given position.
|
@JsNonNull java.lang.String |
concat(java.lang.String... strings)
The concat() method concatenates the string arguments to the calling string and returns a new string.
|
boolean |
endsWith(java.lang.String searchString)
The endsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
|
boolean |
endsWith(java.lang.String searchString,
int position)
The endsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
|
static @JsNonNull java.lang.String |
fromCharCode(int... charCodes)
The static String.fromCharCode() method returns a string created from the specified sequence of UTF-16 code units.
|
static @JsNonNull java.lang.String |
fromCodePoint(int codePoint,
int... codePoints)
The static String.fromCodePoint() method returns a string created by using the specified sequence of code points.
|
boolean |
includes(java.lang.String searchString)
The includes() method performs a case-sensitive search to determine whether one string may be found within another string, returning true or false as appropriate.
|
boolean |
includes(java.lang.String searchString,
int position)
The includes() method performs a case-sensitive search to determine whether one string may be found within another string, returning true or false as appropriate.
|
int |
indexOf(java.lang.String searchValue)
The indexOf() method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring.
|
int |
indexOf(java.lang.String searchValue,
int fromIndex)
The indexOf() method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring.
|
int |
lastIndexOf(java.lang.String searchValue)
The lastIndexOf() method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring.
|
int |
lastIndexOf(java.lang.String searchValue,
int fromIndex)
The lastIndexOf() method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring.
|
int |
length() |
int |
localeCompare(java.lang.String compareString)
The localeCompare() method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order.
|
int |
localeCompare(java.lang.String compareString,
JsArray<java.lang.String> locales)
The localeCompare() method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order.
|
int |
localeCompare(java.lang.String compareString,
JsArray<java.lang.String> locales,
JsObject options)
The localeCompare() method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order.
|
int |
localeCompare(java.lang.String compareString,
java.lang.String... locales)
The localeCompare() method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order.
|
int |
localeCompare(java.lang.String compareString,
java.lang.String locales)
The localeCompare() method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order.
|
int |
localeCompare(java.lang.String compareString,
java.lang.String[] locales,
JsObject options)
The localeCompare() method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order.
|
int |
localeCompare(java.lang.String compareString,
java.lang.String locales,
JsObject options)
The localeCompare() method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order.
|
@JsNonNull JsArray<java.lang.String> |
match(RegExp regexp)
The match() method retrieves the result of matching a string against a regular expression.
|
@JsNonNull JsArray<java.lang.String> |
match(java.lang.String regexp)
The match() method retrieves the result of matching a string against a regular expression.
|
@JsNonNull JsIterator<RegExpResult> |
matchAll(RegExp regexp)
The matchAll() method returns an iterator of all results matching a string against a regular expression, including capturing groups.
|
@JsNonNull JsIterator<RegExpResult> |
matchAll(java.lang.String regexp)
The matchAll() method returns an iterator of all results matching a string against a regular expression, including capturing groups.
|
@JsNonNull java.lang.String |
normalize()
The normalize() method returns the Unicode Normalization Form of the string.
|
@JsNonNull java.lang.String |
normalize(java.lang.String form)
The normalize() method returns the Unicode Normalization Form of the string.
|
@JsNonNull java.lang.String |
padEnd(int targetLength)
The padEnd() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length.
|
@JsNonNull java.lang.String |
padEnd(int targetLength,
java.lang.String padString)
The padEnd() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length.
|
@JsNonNull java.lang.String |
padStart(int targetLength)
The padStart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length.
|
@JsNonNull java.lang.String |
padStart(int targetLength,
java.lang.String padString)
The padStart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length.
|
@JsNonNull java.lang.String |
repeat(int count)
The repeat() method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.
|
@JsNonNull java.lang.String |
replace(RegExp pattern,
java.lang.String replacement)
The replace() method returns a new string with some or all matches of a pattern replaced by a replacement.
|
@JsNonNull java.lang.String |
replace(java.lang.String pattern,
java.lang.String replacement)
The replace() method returns a new string with some or all matches of a pattern replaced by a replacement.
|
int |
search(RegExp pattern)
The search() method executes a search for a match between a regular expression and this String object.
|
int |
search(java.lang.String pattern)
The search() method executes a search for a match between a regular expression and this String object.
|
@JsNonNull java.lang.String |
slice(int begin)
The slice() method extracts a section of a string and returns it as a new string, without modifying the original string.
|
@JsNonNull java.lang.String |
slice(int begin,
int end)
The slice() method extracts a section of a string and returns it as a new string, without modifying the original string.
|
@JsNonNull JsArray<java.lang.String> |
split()
The split() method divides a String into an ordered list of substrings, puts these substrings into an array, and returns the array.
|
@JsNonNull JsArray<java.lang.String> |
split(RegExp separator)
The split() method divides a String into an ordered list of substrings, puts these substrings into an array, and returns the array.
|
@JsNonNull JsArray<java.lang.String> |
split(RegExp separator,
int limit)
The split() method divides a String into an ordered list of substrings, puts these substrings into an array, and returns the array.
|
@JsNonNull JsArray<java.lang.String> |
split(java.lang.String separator)
The split() method divides a String into an ordered list of substrings, puts these substrings into an array, and returns the array.
|
@JsNonNull JsArray<java.lang.String> |
split(java.lang.String separator,
int limit)
The split() method divides a String into an ordered list of substrings, puts these substrings into an array, and returns the array.
|
boolean |
startsWith(java.lang.String searchString)
The startsWith() method determines whether a string begins with the characters of a specified string, returning true or false as appropriate.
|
boolean |
startsWith(java.lang.String searchString,
int position)
The startsWith() method determines whether a string begins with the characters of a specified string, returning true or false as appropriate.
|
@JsNonNull java.lang.String |
substring(int start)
The substring() method returns the part of the string between the start and end indexes, or to the end of the string.
|
@JsNonNull java.lang.String |
substring(int start,
int end)
The substring() method returns the part of the string between the start and end indexes, or to the end of the string.
|
@JsNonNull java.lang.String |
toLocaleLowerCase()
The toLocaleLowerCase() method returns the calling string value converted to lower case, according to any locale-specific case mappings.
|
@JsNonNull java.lang.String |
toLocaleLowerCase(JsArray<java.lang.String> locales)
The toLocaleLowerCase() method returns the calling string value converted to lower case, according to any locale-specific case mappings.
|
@JsNonNull java.lang.String |
toLocaleLowerCase(java.lang.String... locales)
The toLocaleLowerCase() method returns the calling string value converted to lower case, according to any locale-specific case mappings.
|
@JsNonNull java.lang.String |
toLocaleUpperCase()
The toLocaleUpperCase() method returns the calling string value converted to upper case, according to any locale-specific case mappings.
|
@JsNonNull java.lang.String |
toLocaleUpperCase(JsArray<java.lang.String> locales)
The toLocaleUpperCase() method returns the calling string value converted to upper case, according to any locale-specific case mappings.
|
@JsNonNull java.lang.String |
toLocaleUpperCase(java.lang.String... locales)
The toLocaleUpperCase() method returns the calling string value converted to upper case, according to any locale-specific case mappings.
|
@JsNonNull java.lang.String |
toLowerCase()
The toLowerCase() method returns the calling string value converted to lower case.
|
@JsNonNull java.lang.String |
toUpperCase()
The toUpperCase() method returns the calling string value converted to uppercase (the value will be converted to a string if it isn't one).
|
@JsNonNull java.lang.String |
trim()
The trim() method removes whitespace from both ends of a string and returns a new string, without modifying the original string.
|
@JsNonNull java.lang.String |
trimEnd()
The trimEnd() method removes whitespace from the end of a string.
|
@JsNonNull java.lang.String |
trimLeft() |
@JsNonNull java.lang.String |
trimRight() |
@JsNonNull java.lang.String |
trimStart()
The trimStart() method removes whitespace from the beginning of a string.
|
@JsNonNull java.lang.String |
valueOf()
The valueOf() method returns the primitive value of a String object.
|
assign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, valuespublic JsString(@Nonnull
java.lang.String str)
public JsString()
@JsProperty(name="length") public int length()
public static @JsNonNull java.lang.String fromCharCode(int... charCodes)
public static @JsNonNull java.lang.String fromCodePoint(int codePoint,
int... codePoints)
public @JsNonNull java.lang.String charAt(int index)
public int charCodeAt()
public int charCodeAt(int index)
public int codePointAt(int index)
public @JsNonNull java.lang.String concat(@Nonnull
java.lang.String... strings)
public boolean endsWith(@Nonnull
java.lang.String searchString,
int position)
public boolean endsWith(@Nonnull
java.lang.String searchString)
public boolean includes(@Nonnull
java.lang.String searchString,
int position)
public boolean includes(@Nonnull
java.lang.String searchString)
public int indexOf(@Nonnull
java.lang.String searchValue,
int fromIndex)
public int indexOf(@Nonnull
java.lang.String searchValue)
public int lastIndexOf(@Nonnull
java.lang.String searchValue,
int fromIndex)
public int lastIndexOf(@Nonnull
java.lang.String searchValue)
public int localeCompare(@Nonnull
java.lang.String compareString,
@Nonnull
java.lang.String locales,
@Nonnull
JsObject options)
public int localeCompare(@Nonnull
java.lang.String compareString,
@Nonnull
JsArray<java.lang.String> locales,
@Nonnull
JsObject options)
public int localeCompare(@Nonnull
java.lang.String compareString,
@Nonnull
java.lang.String[] locales,
@Nonnull
JsObject options)
public int localeCompare(@Nonnull
java.lang.String compareString,
@Nonnull
java.lang.String locales)
public int localeCompare(@Nonnull
java.lang.String compareString,
@Nonnull
JsArray<java.lang.String> locales)
@JsOverlay
public final int localeCompare(@Nonnull
java.lang.String compareString,
@Nonnull
java.lang.String... locales)
public int localeCompare(@Nonnull
java.lang.String compareString)
public @JsNonNull JsArray<java.lang.String> match(@Nonnull RegExp regexp)
public @JsNonNull JsArray<java.lang.String> match(@Nonnull java.lang.String regexp)
public @JsNonNull JsIterator<RegExpResult> matchAll(@Nonnull RegExp regexp)
public @JsNonNull JsIterator<RegExpResult> matchAll(@Nonnull java.lang.String regexp)
public @JsNonNull java.lang.String normalize(@Nonnull
java.lang.String form)
public @JsNonNull java.lang.String normalize()
public @JsNonNull java.lang.String padEnd(int targetLength,
@Nonnull
java.lang.String padString)
public @JsNonNull java.lang.String padEnd(int targetLength)
public @JsNonNull java.lang.String padStart(int targetLength,
@Nonnull
java.lang.String padString)
public @JsNonNull java.lang.String padStart(int targetLength)
public @JsNonNull java.lang.String repeat(int count)
public @JsNonNull java.lang.String replace(@Nonnull
RegExp pattern,
@Nonnull
java.lang.String replacement)
public @JsNonNull java.lang.String replace(@Nonnull
java.lang.String pattern,
@Nonnull
java.lang.String replacement)
public int search(@Nonnull
RegExp pattern)
public int search(@Nonnull
java.lang.String pattern)
public @JsNonNull java.lang.String slice(int begin,
int end)
public @JsNonNull java.lang.String slice(int begin)
public @JsNonNull JsArray<java.lang.String> split(@Nonnull RegExp separator, int limit)
public @JsNonNull JsArray<java.lang.String> split(@Nonnull java.lang.String separator, int limit)
public @JsNonNull JsArray<java.lang.String> split(@Nonnull RegExp separator)
public @JsNonNull JsArray<java.lang.String> split(@Nonnull java.lang.String separator)
public @JsNonNull JsArray<java.lang.String> split()
public boolean startsWith(@Nonnull
java.lang.String searchString,
int position)
public boolean startsWith(@Nonnull
java.lang.String searchString)
public @JsNonNull java.lang.String substring(int start,
int end)
public @JsNonNull java.lang.String substring(int start)
public @JsNonNull java.lang.String toLocaleLowerCase(@Nonnull
JsArray<java.lang.String> locales)
@JsOverlay
public final @JsNonNull java.lang.String toLocaleLowerCase(@Nonnull
java.lang.String... locales)
public @JsNonNull java.lang.String toLocaleLowerCase()
public @JsNonNull java.lang.String toLocaleUpperCase(@Nonnull
JsArray<java.lang.String> locales)
@JsOverlay
public final @JsNonNull java.lang.String toLocaleUpperCase(@Nonnull
java.lang.String... locales)
public @JsNonNull java.lang.String toLocaleUpperCase()
public @JsNonNull java.lang.String toLowerCase()
public @JsNonNull java.lang.String toUpperCase()
public @JsNonNull java.lang.String trim()
public @JsNonNull java.lang.String trimEnd()
public @JsNonNull java.lang.String trimLeft()
public @JsNonNull java.lang.String trimRight()
public @JsNonNull java.lang.String trimStart()
public @JsNonNull java.lang.String valueOf()