Zum Hauptinhalt springen
Version: 25.226.1329.2

String

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:410

Indexable

[index: number]: string

Eigenschaften

EigenschaftModifierTypeDescriptionDefiniert in
lengthreadonlynumberReturns the length of a String object.cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:517

Methoden

[iterator]()

iterator: StringIterator<string>;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.iterable.d.ts:272

Iterator

Rückgabewert

StringIterator<string>


anchor()

anchor(name): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:463

Returns an <a> HTML anchor element and sets the name attribute to the text value

Parameter

ParameterTypeDescription
namestring

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


at()

at(index): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2022.string.d.ts:24

Returns a new String consisting of the single UTF-16 code unit located at the specified index.

Parameter

ParameterTypeDescription
indexnumberThe zero-based index of the desired code unit. A negative index will count back from the last item.

Rückgabewert

string


big()

big(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:469

Returns a <big> HTML element

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


blink(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:475

Returns a <blink> HTML element

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


bold()

bold(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:481

Returns a <b> HTML element

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


charAt()

charAt(pos): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:418

Returns the character at the specified index.

Parameter

ParameterTypeDescription
posnumberThe zero-based index of the desired character.

Rückgabewert

string


charCodeAt()

charCodeAt(index): number;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:424

Returns the Unicode value of the character at the specified location.

Parameter

ParameterTypeDescription
indexnumberThe zero-based index of the desired character. If there is no character at the specified index, NaN is returned.

Rückgabewert

number


codePointAt()

codePointAt(pos): number;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:410

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.

Parameter

ParameterType
posnumber

Rückgabewert

number


concat()

concat(...strings): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:430

Returns a string that contains the concatenation of two or more strings.

Parameter

ParameterTypeDescription
...stringsstring[]The strings to append to the end of the string.

Rückgabewert

string


endsWith()

endsWith(searchString, endPosition?): boolean;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:426

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.

Parameter

ParameterType
searchStringstring
endPosition?number

Rückgabewert

boolean


fixed()

fixed(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:487

Returns a <tt> HTML element

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


fontcolor()

fontcolor(color): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:493

Returns a <font> HTML element and sets the color attribute value

Parameter

ParameterType
colorstring

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


fontsize()

Aufrufsignatur

fontsize(size): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:499

Returns a <font> HTML element and sets the size attribute value

Parameter
ParameterType
sizenumber
Rückgabewert

string

Deprecated

A legacy feature for browser compatibility

Aufrufsignatur

fontsize(size): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:505

Returns a <font> HTML element and sets the size attribute value

Parameter
ParameterType
sizestring
Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


includes()

includes(searchString, position?): boolean;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:419

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.

Parameter

ParameterTypeDescription
searchStringstringsearch string
position?numberIf position is undefined, 0 is assumed, so as to search all of the String.

Rückgabewert

boolean


indexOf()

indexOf(searchString, position?): number;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:437

Returns the position of the first occurrence of a substring.

Parameter

ParameterTypeDescription
searchStringstringThe substring to search for in the string
position?numberThe index at which to begin searching the String object. If omitted, search starts at the beginning of the string.

Rückgabewert

number


isWellFormed()

isWellFormed(): boolean;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2024.string.d.ts:23

Returns true if all leading surrogates and trailing surrogates appear paired and in order.

Rückgabewert

boolean


italics()

italics(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:511

Returns an <i> HTML element

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


lastIndexOf()

lastIndexOf(searchString, position?): number;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:444

Returns the last occurrence of a substring in the string.

Parameter

ParameterTypeDescription
searchStringstringThe substring to search for.
position?numberThe index at which to begin searching. If omitted, the search begins at the end of the string.

Rückgabewert

number


link(url): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:517

Returns an <a> HTML element and sets the href attribute value

Parameter

ParameterType
urlstring

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


localeCompare()

Aufrufsignatur

localeCompare(that): number;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:450

Determines whether two strings are equivalent in the current locale.

Parameter
ParameterTypeDescription
thatstringString to compare to target string
Rückgabewert

number

Aufrufsignatur

localeCompare(
that,
locales?,
options?): number;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:4562

Determines whether two strings are equivalent in the current or specified locale.

Parameter
ParameterTypeDescription
thatstringString to compare to target string
locales?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.
options?CollatorOptionsAn object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
Rückgabewert

number

Aufrufsignatur

localeCompare(
that,
locales?,
options?): number;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2020.string.d.ts:43

Determines whether two strings are equivalent in the current or specified locale.

Parameter
ParameterTypeDescription
thatstringString to compare to target string
locales?LocalesArgumentA 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.
options?CollatorOptionsAn object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
Rückgabewert

number


match()

Aufrufsignatur

match(regexp): RegExpMatchArray;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:456

Matches a string with a regular expression, and returns an array containing the results of that search.

Parameter
ParameterTypeDescription
regexpstring | RegExpA variable name or string literal containing the regular expression pattern and flags.
Rückgabewert

RegExpMatchArray

Aufrufsignatur

match(matcher): RegExpMatchArray;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:241

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.

Parameter
ParameterTypeDescription
matcher{ [match]: RegExpMatchArray; }An object that supports being matched against.
matcher.[match]-
Rückgabewert

RegExpMatchArray


matchAll()

matchAll(regexp): RegExpStringIterator<RegExpExecArray>;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2020.string.d.ts:29

Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.

Parameter

ParameterTypeDescription
regexpRegExpA variable name or string literal containing the regular expression pattern and flags.

Rückgabewert

RegExpStringIterator<RegExpExecArray>


normalize()

Aufrufsignatur

normalize(form): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:434

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.

Parameter
ParameterTypeDescription
form"NFC" | "NFD" | "NFKC" | "NFKD"Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default is "NFC"
Rückgabewert

string

Aufrufsignatur

normalize(form?): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:442

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.

Parameter
ParameterTypeDescription
form?stringApplicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default is "NFC"
Rückgabewert

string


padEnd()

padEnd(maxLength, fillString?): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2017.string.d.ts:44

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.

Parameter

ParameterTypeDescription
maxLengthnumberThe 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.
fillString?stringThe 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).

Rückgabewert

string


padStart()

padStart(maxLength, fillString?): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2017.string.d.ts:31

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.

Parameter

ParameterTypeDescription
maxLengthnumberThe 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.
fillString?stringThe 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).

Rückgabewert

string


repeat()

repeat(count): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:449

Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.

Parameter

ParameterTypeDescription
countnumbernumber of copies to append

Rückgabewert

string


replace()

Aufrufsignatur

replace(searchValue, replaceValue): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:463

Replaces text in a string, using a regular expression or search string.

Parameter
ParameterTypeDescription
searchValuestring | RegExpA string or regular expression to search for.
replaceValuestringA string containing the text to replace. When the searchValue is a RegExp, all matches are replaced if the g flag is set (or only those matches at the beginning, if the y flag is also present). Otherwise, only the first match of searchValue is replaced.
Rückgabewert

string

Aufrufsignatur

replace(searchValue, replacer): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:470

Replaces text in a string, using a regular expression or search string.

Parameter
ParameterTypeDescription
searchValuestring | RegExpA string to search for.
replacer(substring, ...args) => stringA function that returns the replacement text.
Rückgabewert

string

Aufrufsignatur

replace(searchValue, replaceValue): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:248

Passes a string and replaceValue to the [Symbol.replace] method on searchValue. This method is expected to implement its own replacement algorithm.

Parameter
ParameterTypeDescription
searchValue{ [replace]: string; }An object that supports searching for and replacing matches within a string.
searchValue.[replace]-
replaceValuestringThe replacement text.
Rückgabewert

string

Aufrufsignatur

replace(searchValue, replacer): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:255

Replaces text in a string, using an object that supports replacement within a string.

Parameter
ParameterTypeDescription
searchValue{ [replace]: string; }A object can search for and replace matches within a string.
searchValue.[replace]-
replacer(substring, ...args) => stringA function that returns the replacement text.
Rückgabewert

string


replaceAll()

Aufrufsignatur

replaceAll(searchValue, replaceValue): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2021.string.d.ts:25

Replace all instances of a substring in a string, using a regular expression or search string.

Parameter
ParameterTypeDescription
searchValuestring | RegExpA string to search for.
replaceValuestringA string containing the text to replace for every successful match of searchValue in this string.
Rückgabewert

string

Aufrufsignatur

replaceAll(searchValue, replacer): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2021.string.d.ts:32

Replace all instances of a substring in a string, using a regular expression or search string.

Parameter
ParameterTypeDescription
searchValuestring | RegExpA string to search for.
replacer(substring, ...args) => stringA function that returns the replacement text.
Rückgabewert

string


Aufrufsignatur

search(regexp): number;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:476

Finds the first substring match in a regular expression search.

Parameter
ParameterTypeDescription
regexpstring | RegExpThe regular expression pattern and applicable flags.
Rückgabewert

number

Aufrufsignatur

search(searcher): number;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:261

Finds the first substring match in a regular expression search.

Parameter
ParameterTypeDescription
searcher{ [search]: number; }An object which supports searching within a string.
searcher.[search]-
Rückgabewert

number


slice()

slice(start?, end?): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:484

Returns a section of a string.

Parameter

ParameterTypeDescription
start?numberThe index to the beginning of the specified portion of stringObj.
end?numberThe 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.

Rückgabewert

string


small()

small(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:523

Returns a <small> HTML element

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


split()

Aufrufsignatur

split(separator, limit?): string[];

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:491

Split a string into substrings using the specified separator and return them as an array.

Parameter
ParameterTypeDescription
separatorstring | 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.
limit?numberA value used to limit the number of elements returned in the array.
Rückgabewert

string[]

Aufrufsignatur

split(splitter, limit?): string[];

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:268

Split a string into substrings using the specified separator and return them as an array.

Parameter
ParameterTypeDescription
splitter{ [split]: string[]; }An object that can split a string.
splitter.[split]-
limit?numberA value used to limit the number of elements returned in the array.
Rückgabewert

string[]


startsWith()

startsWith(searchString, position?): boolean;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:456

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.

Parameter

ParameterType
searchStringstring
position?number

Rückgabewert

boolean


strike()

strike(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:529

Returns a <strike> HTML element

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


sub()

sub(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:535

Returns a <sub> HTML element

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


substr()

substr(from, length?): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:526

Gets a substring beginning at the specified location and having the specified length.

Parameter

ParameterTypeDescription
fromnumberThe starting position of the desired substring. The index of the first character in the string is zero.
length?numberThe number of characters to include in the returned substring.

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


substring()

substring(start, end?): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:499

Returns the substring at the specified location within a String object.

Parameter

ParameterTypeDescription
startnumberThe zero-based index number indicating the beginning of the substring.
end?numberZero-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.

Rückgabewert

string


sup()

sup(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2015.core.d.ts:541

Returns a <sup> HTML element

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility


toLocaleLowerCase()

Aufrufsignatur

toLocaleLowerCase(locales?): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:505

Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.

Parameter
ParameterType
locales?string | string[]
Rückgabewert

string

Aufrufsignatur

toLocaleLowerCase(locales?): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2020.string.d.ts:32

Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.

Parameter
ParameterType
locales?LocalesArgument
Rückgabewert

string


toLocaleUpperCase()

Aufrufsignatur

toLocaleUpperCase(locales?): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:511

Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.

Parameter
ParameterType
locales?string | string[]
Rückgabewert

string

Aufrufsignatur

toLocaleUpperCase(locales?): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2020.string.d.ts:35

Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.

Parameter
ParameterType
locales?LocalesArgument
Rückgabewert

string


toLowerCase()

toLowerCase(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:502

Converts all the alphabetic characters in a string to lowercase.

Rückgabewert

string


toSqlString()

toSqlString(useNVarchar?): string;

Definiert in: lib/cosmolink.Lib.StringExtensions.ts:131

Formartiert einen String für SQL hierbei werden ' verdoppelt.

Parameter

ParameterTypeDescription
useNVarchar?booleangibt an ob nvarchar/nchar oder varchar/char verwendet werden soll - Default = true

Rückgabewert

string

Example

const s: string = "Test ' Text";
s.toSqlString() //=> N'Test '' Text'
s.toSqlString(false) //=> 'Test '' Text'

toString()

toString(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:412

Returns a string representation of a string.

Rückgabewert

string


toUpperCase()

toUpperCase(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:508

Converts all the alphabetic characters in a string to uppercase.

Rückgabewert

string


toWellFormed()

toWellFormed(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2024.string.d.ts:28

Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD).

Rückgabewert

string


trim()

trim(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:514

Removes the leading and trailing white space and line terminator characters from a string.

Rückgabewert

string


trimChar()

trimChar(char): string;

Definiert in: lib/cosmolink.Lib.StringExtensions.ts:136

Parameter

ParameterType
charstring

Rückgabewert

string


trimCharEnd()

trimCharEnd(char): string;

Definiert in: lib/cosmolink.Lib.StringExtensions.ts:146

Parameter

ParameterType
charstring

Rückgabewert

string


trimCharStart()

trimCharStart(char): string;

Definiert in: lib/cosmolink.Lib.StringExtensions.ts:141

Parameter

ParameterType
charstring

Rückgabewert

string


trimEnd()

trimEnd(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2019.string.d.ts:21

Removes the trailing white space and line terminator characters from a string.

Rückgabewert

string


trimLeft()

trimLeft(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2019.string.d.ts:30

Removes the leading white space and line terminator characters from a string.

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility. Use trimStart instead


trimRight()

trimRight(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2019.string.d.ts:36

Removes the trailing white space and line terminator characters from a string.

Rückgabewert

string

Deprecated

A legacy feature for browser compatibility. Use trimEnd instead


trimStart()

trimStart(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es2019.string.d.ts:24

Removes the leading white space and line terminator characters from a string.

Rückgabewert

string


valueOf()

valueOf(): string;

Definiert in: cosmolink-typesaurus/node_modules/typescript/lib/lib.es5.d.ts:529

Returns the primitive value of the specified object.

Rückgabewert

string