Interface String
length: number;
"[iterator]"(): StringIterator<string>;
anchor(name: string): string;
at(index: number): string;
big(): string;
blink(): string;
bold(): string;
charAt(pos: number): string;
charCodeAt(index: number): number;
codePointAt(pos: number): number;
concat(...strings: string[]): string;
endsWith(searchString: string, endPosition?: number): boolean;
fixed(): string;
fontcolor(color: string): string;
fontsize(size: number): string;
fontsize(size: string): string;
includes(searchString: string, position?: number): boolean;
indexOf(searchString: string, position?: number): number;
isWellFormed(): boolean;
italics(): string;
lastIndexOf(searchString: string, position?: number): number;
link(url: string): string;
localeCompare(that: string): number;
localeCompare(
that: string,
locales?: string | string[],
options?: CollatorOptions,
): number;
localeCompare(
that: string,
locales?: LocalesArgument,
options?: CollatorOptions,
): number;
match(regexp: string | RegExp): RegExpMatchArray;
match(
matcher: { "[match]"(string: string): RegExpMatchArray },
): RegExpMatchArray;
matchAll(regexp: RegExp): RegExpStringIterator<RegExpExecArray>;
normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
normalize(form?: string): string;
padEnd(maxLength: number, fillString?: string): string;
padStart(maxLength: number, fillString?: string): string;
repeat(count: number): string;
replace(searchValue: string | RegExp, replaceValue: string): string;
replace(
searchValue: string | RegExp,
replacer: (substring: string, ...args: any[]) => string,
): string;
replace(
searchValue: {
"[replace]"(string: string, replaceValue: string): string;
},
replaceValue: string,
): string;
replace(
searchValue: {
"[replace]"(
string: string,
replacer: (substring: string, ...args: any[]) => string,
): string;
},
replacer: (substring: string, ...args: any[]) => string,
): string;
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
replaceAll(
searchValue: string | RegExp,
replacer: (substring: string, ...args: any[]) => string,
): string;
search(regexp: string | RegExp): number;
search(searcher: { "[search]"(string: string): number }): number;
slice(start?: number, end?: number): string;
small(): string;
split(separator: string | RegExp, limit?: number): string[];
split(
splitter: { "[split]"(string: string, limit?: number): string[] },
limit?: number,
): string[];
startsWith(searchString: string, position?: number): boolean;
strike(): string;
sub(): string;
substr(from: number, length?: number): string;
substring(start: number, end?: number): string;
sup(): string;
toLocaleLowerCase(locales?: string | string[]): string;
toLocaleLowerCase(locales?: LocalesArgument): string;
toLocaleUpperCase(locales?: string | string[]): string;
toLocaleUpperCase(locales?: LocalesArgument): string;
toLowerCase(): string;
toString(): string;
toUpperCase(): string;
toWellFormed(): string;
trim(): string;
trimEnd(): string;
trimLeft(): string;
trimRight(): string;
trimStart(): string;
valueOf(): string;
readonly [index: number]: string;
}
Indexable
- readonly [index: number]: string
 Index
Properties
Methods
 Methods
[iterator]
- "[iterator]"(): StringIterator<string>
- Iterator - Returns StringIterator<string>
anchor
at
big
blink
bold
charAt 
charCodeAt  
codePointAt  
- codePointAt(pos: number): number
- Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. - Parameters- pos: number
 - Returns number
concat
endsWith 
- endsWith(searchString: string, endPosition?: number): boolean
- Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false. - Parameters- searchString: string
- OptionalendPosition: number
 - Returns boolean
fixed
fontcolor
fontsize
includes
- includes(searchString: string, position?: number): boolean
- Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false. - Parameters- searchString: stringsearch string 
- Optionalposition: number- If position is undefined, 0 is assumed, so as to search all of the String. 
 - Returns boolean
- searchString: string
indexOf 
- indexOf(searchString: string, position?: number): number
- Returns the position of the first occurrence of a substring. - Parameters- searchString: stringThe substring to search for in the string 
- Optionalposition: number- The index at which to begin searching the String object. If omitted, search starts at the beginning of the string. 
 - Returns number
- searchString: string
isWellFormed  
italics
lastIndexOf  
- lastIndexOf(searchString: string, position?: number): number
- Returns the last occurrence of a substring in the string. - Parameters- searchString: stringThe substring to search for. 
- Optionalposition: number- The index at which to begin searching. If omitted, the search begins at the end of the string. 
 - Returns number
- searchString: string
link
localeCompare 
- localeCompare(that: string): number
- Determines whether two strings are equivalent in the current locale. - Parameters- that: stringString to compare to target string 
 - Returns number
- that: string
- localeCompare(
 that: string,
 locales?: string | string[],
 options?: CollatorOptions,
 ): number
- Determines whether two strings are equivalent in the current or specified locale. - Parameters- that: stringString to compare to target string 
- Optionallocales: string | string[]- A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. 
- Optionaloptions: CollatorOptions- An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. 
 - Returns number
- that: string
- localeCompare(
 that: string,
 locales?: LocalesArgument,
 options?: CollatorOptions,
 ): number
- Determines whether two strings are equivalent in the current or specified locale. - Parameters- that: stringString to compare to target string 
- Optionallocales: LocalesArgument- A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details. 
- Optionaloptions: CollatorOptions- An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details. 
 - Returns number
- that: string
match
- match(regexp: string | RegExp): RegExpMatchArray
- Matches a string with a regular expression, and returns an array containing the results of that search. - Parameters- regexp: string | RegExpA variable name or string literal containing the regular expression pattern and flags. 
 - Returns RegExpMatchArray
- regexp: string | RegExp
- match(
 matcher: { "[match]"(string: string): RegExpMatchArray },
 ): RegExpMatchArray
- Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found. - Parameters- matcher: { "[match]"(string: string): RegExpMatchArray }An object that supports being matched against. 
 - Returns RegExpMatchArray
- matcher: { "[match]"(string: string): RegExpMatchArray }
matchAll 
- matchAll(regexp: RegExp): RegExpStringIterator<RegExpExecArray>
- Matches a string with a regular expression, and returns an iterable of matches containing the results of that search. - Parameters- regexp: RegExpA variable name or string literal containing the regular expression pattern and flags. 
 - Returns RegExpStringIterator<RegExpExecArray>
- regexp: RegExp
normalize
- normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string
- Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - Parameters- form: "NFC" | "NFD" | "NFKC" | "NFKD"Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default is "NFC" 
 - Returns string
- form: "NFC" | "NFD" | "NFKC" | "NFKD"
- normalize(form?: string): string
- Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - Parameters- Optionalform: string- Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default is "NFC" 
 - Returns string
padEnd 
- padEnd(maxLength: number, fillString?: string): string
- Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string. - Parameters- maxLength: numberThe length of the resulting string once the current string has been padded. If this parameter is smaller than the current string's length, the current string will be returned as it is. 
- OptionalfillString: string- The string to pad the current string with. If this string is too long, it will be truncated and the left-most part will be applied. The default value for this parameter is " " (U+0020). 
 - Returns string
- maxLength: number
padStart 
- padStart(maxLength: number, fillString?: string): string
- Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string. - Parameters- maxLength: numberThe length of the resulting string once the current string has been padded. If this parameter is smaller than the current string's length, the current string will be returned as it is. 
- OptionalfillString: string- The string to pad the current string with. If this string is too long, it will be truncated and the left-most part will be applied. The default value for this parameter is " " (U+0020). 
 - Returns string
- maxLength: number
repeat
replace
- replace(searchValue: string | RegExp, replaceValue: string): string
- Replaces text in a string, using a regular expression or search string. - Parameters- searchValue: string | RegExpA string or regular expression to search for. 
- replaceValue: stringA string containing the text to replace. When the searchValueis aRegExp, all matches are replaced if thegflag is set (or only those matches at the beginning, if theyflag is also present). Otherwise, only the first match ofsearchValueis replaced.
 - Returns string
- searchValue: string | RegExp
- replace(
 searchValue: string | RegExp,
 replacer: (substring: string, ...args: any[]) => string,
 ): string
- Replaces text in a string, using a regular expression or search string. - Parameters- searchValue: string | RegExpA string to search for. 
- replacer: (substring: string, ...args: any[]) => stringA function that returns the replacement text. 
 - Returns string
- searchValue: string | RegExp
- replace(
 searchValue: {
 "[replace]"(string: string, replaceValue: string): string;
 },
 replaceValue: string,
 ): string
- Passes a string and - replaceValueto the- [Symbol.replace]method on- searchValue. This method is expected to implement its own replacement algorithm.- Parameters- searchValue: { "[replace]"(string: string, replaceValue: string): string }An object that supports searching for and replacing matches within a string. 
- replaceValue: stringThe replacement text. 
 - Returns string
- searchValue: { "[replace]"(string: string, replaceValue: string): string }
- replace(
 searchValue: {
 "[replace]"(
 string: string,
 replacer: (substring: string, ...args: any[]) => string,
 ): string;
 },
 replacer: (substring: string, ...args: any[]) => string,
 ): string
- Replaces text in a string, using an object that supports replacement within a string. - Parameters- searchValue: {
 "[replace]"(
 string: string,
 replacer: (substring: string, ...args: any[]) => string,
 ): string;
 }A object can search for and replace matches within a string. 
- replacer: (substring: string, ...args: any[]) => stringA function that returns the replacement text. 
 - Returns string
- searchValue: {
replaceAll 
- replaceAll(searchValue: string | RegExp, replaceValue: string): string
- Replace all instances of a substring in a string, using a regular expression or search string. - Parameters- searchValue: string | RegExpA string to search for. 
- replaceValue: stringA string containing the text to replace for every successful match of searchValue in this string. 
 - Returns string
- searchValue: string | RegExp
- replaceAll(
 searchValue: string | RegExp,
 replacer: (substring: string, ...args: any[]) => string,
 ): string
- Replace all instances of a substring in a string, using a regular expression or search string. - Parameters- searchValue: string | RegExpA string to search for. 
- replacer: (substring: string, ...args: any[]) => stringA function that returns the replacement text. 
 - Returns string
- searchValue: string | RegExp
search
- search(regexp: string | RegExp): number
- Finds the first substring match in a regular expression search. - Parameters- regexp: string | RegExpThe regular expression pattern and applicable flags. 
 - Returns number
- regexp: string | RegExp
- search(searcher: { "[search]"(string: string): number }): number
- Finds the first substring match in a regular expression search. - Parameters- searcher: { "[search]"(string: string): number }An object which supports searching within a string. 
 - Returns number
- searcher: { "[search]"(string: string): number }
slice
- slice(start?: number, end?: number): string
- Returns a section of a string. - Parameters- Optionalstart: number- The index to the beginning of the specified portion of stringObj. 
- Optionalend: number- The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. If this value is not specified, the substring continues to the end of stringObj. 
 - Returns string
small
split
- split(separator: string | RegExp, limit?: number): string[]
- Split a string into substrings using the specified separator and return them as an array. - Parameters- separator: string | RegExpA string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. 
- Optionallimit: number- A value used to limit the number of elements returned in the array. 
 - Returns string[]
- separator: string | RegExp
- split(
 splitter: { "[split]"(string: string, limit?: number): string[] },
 limit?: number,
 ): string[]
- Split a string into substrings using the specified separator and return them as an array. - Parameters- splitter: { "[split]"(string: string, limit?: number): string[] }An object that can split a string. 
- Optionallimit: number- A value used to limit the number of elements returned in the array. 
 - Returns string[]
- splitter: { "[split]"(string: string, limit?: number): string[] }
startsWith 
- startsWith(searchString: string, position?: number): boolean
- Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false. - Parameters- searchString: string
- Optionalposition: number
 - Returns boolean
strike
sub
substr
- substr(from: number, length?: number): string
- Gets a substring beginning at the specified location and having the specified length. - Parameters- from: numberThe starting position of the desired substring. The index of the first character in the string is zero. 
- Optionallength: number- The number of characters to include in the returned substring. 
 - Returns string
- from: number
substring
- substring(start: number, end?: number): string
- Returns the substring at the specified location within a String object. - Parameters- start: numberThe zero-based index number indicating the beginning of the substring. 
- Optionalend: number- Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. If end is omitted, the characters from start through the end of the original string are returned. 
 - Returns string
- start: number
sup
toLocaleLowerCase   
- toLocaleLowerCase(locales?: string | string[]): string
- Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. - Parameters- Optionallocales: string | string[]
 - Returns string
- toLocaleLowerCase(locales?: LocalesArgument): string
- Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. - Parameters- Optionallocales: LocalesArgument
 - Returns string
toLocaleUpperCase   
- toLocaleUpperCase(locales?: string | string[]): string
- Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. - Parameters- Optionallocales: string | string[]
 - Returns string
- toLocaleUpperCase(locales?: LocalesArgument): string
- Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. - Parameters- Optionallocales: LocalesArgument
 - Returns string
Returns the length of a String object.