TypeScript – String valueOf()
This method returns the primitive value of a String object. Syntax string.valueOf( ) Return Value Returns the primitive value of a String object. Example var str = new String("Hello world");…
This method returns the primitive value of a String object. Syntax string.valueOf( ) Return Value Returns the primitive value of a String object. Example var str = new String("Hello world");…
This method returns the calling string value converted to uppercase. Syntax string.toUpperCase( ) Return Value Returns a string representing the specified object. Example var str = "Apples are round, and…
This method returns a string representing the specified object. Syntax string.toString( ) Return Value Returns a string representing the specified object. Example var str = "Apples are round, and Apples…
This method returns the calling string value converted to lowercase. Syntax string.toLowerCase( ) Return Value Returns the calling string value converted to lowercase. Example var str = "Apples are round,…
This method is used to convert the characters within a string to uppercase while respecting the current locale. For most languages, it returns the same output as toUpperCase. Syntax string.toLocaleUpperCase(…
This method is used to convert the characters within a string to lowercase while respecting the current locale. For most languages, it returns the same output as toLowerCase. Syntax string.toLocaleLowerCase(…
This method returns a subset of a String object. Syntax string.substring(indexA, [indexB]) Argument Details indexA − An integer between 0 and one less than the length of the string.indexB − (optional) An…
This method returns the characters in a string beginning at the specified location through the specified number of characters. Syntax string.substr(start[, length]); Argument Details start − Location at which to start…
This method splits a String object into an array of strings by separating the string into substrings. Syntax string.split([separator][, limit]); Argument Details separator − Specifies the character to use for separating…
This method extracts a section of a string and returns a new string. Syntax string.slice( beginslice [, endSlice] ); Argument Details beginSlice − The zero-based index at which to begin extraction.endSlice −…