JavaScript – String charAt() Method
The String charAt() method returns the character at a specified position in a string.
The String charAt() method returns the character at a specified position in a string.
The String charAt() method returns the Unicode (UTF-16) of the character at a specified position in a string.
The String codePointAt() method returns the Unicode of the character at a specified position in a string.
The String concat() method joins two or more strings, returning a new string, without changing the existing strings.
The String constructor property returns the function that created the String prototype.
The String endsWith() method returns true if a string ends with a specified string, if not, it returns false. The method is case sensitive.
The String.fromCharCode() method converts Unicode values to characters.
The String includes() method returns “true” if a string contains a specified string, if not, it returns “false”. The method is case sensitive.
The String indexOf() method returns the position of the first occurrence of a value in a string, and returns -1 if the value is not found.
The String lastIndexOf() method returns the position of the last occurrence, searching from the end to the beginning, of a specified value in a string.
The String length property returns the length of a string. An empty string will return 0.
The String localeCompare() method compares two strings in the current locale, and returns their sort order -1, 1, or 0 (before, after, equal).
The String match() method matches a string against a regular expression, returning an array with the matches or null if no match is found.
The String prototype property allows the addition of new properties and methods to strings.
The String repeat() method returns a new string with a number of copies of an existing string, without changing the original string.
The String replace() method searches a string for a value or a regular expression, and returns a new string with the values replaced.
The String search() method matches a string against a regular expression, returning the position of the first match or -1 if no match is found.
The String slice() method extracts a part of a string, returning the extracted part as a new string, without changing the original string.
The String split() method splits a string into an array of substrings, and returns a new array, without changing the original string.
The String startsWith() method returns “true” if a string starts with a specified string, if not, it returns “false”.