![]() ![]() Here is a list of the methods that return a copy of the string wrapped inside an appropriate HTML tag. Returns the primitive value of the specified object. Returns the calling string value converted to uppercase. Returns a string representing the specified object. Returns the calling string value converted to lower case. The characters within a string are converted to upper case while respecting the current locale. The characters within a string are converted to lower case while respecting the current locale. Returns the characters in a string between two indexes into the string. Returns the characters in a string beginning at the specified location through the specified number of characters. Splits a String object into an array of strings by separating the string into substrings. ![]() Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.Įxecutes the search for a match between a regular expression and a specified string.Įxtracts a section of a string and returns a new string. ![]() Used to match a regular expression against a string. Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order. Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found. Returns the index within the calling String object of the first occurrence of the specified value, or -1 if not found. Returns a number indicating the Unicode value of the character at the given index.Ĭombines the text of two strings and returns a new string. Returns the character at the specified index. Here is a list of the methods available in String object along with their description. In the following sections, we will have a few examples to demonstrate the usage of String properties. The prototype property allows you to add properties and methods to an object. Returns a reference to the String function that created the object. Here is a list of the properties of String object and their description. The String parameter is a series of characters that has been properly encoded. Use the following syntax to create a String object − The String object lets you work with a series of characters it wraps Javascript's string primitive data type with a number of helper methods.Īs JavaScript automatically converts between string primitives and String objects, you can call any of the helper methods of the String object on a string primitive. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |