A String in Javascript stores characters. This is how to stor a string

var text = "this is a String"

charAt

Returns the character at a specified position

charCodeAt

return the Unicode character at the specified position

concat

join two or more strings and return a joined string

endsWith

Check if a string ends with a specified string or character

fromCharCode

Convert Unicode value to character

includes

Check if a string contains the given string or character

indexOf

Return the position of the first occurrence of a given value in a string

lastIndexOf

Return the position of the last occurrence of a given value in a string

localeCompare

Compare two strings

match

Return the matches of a searced regular expression in a string

repeat

search a string for a regular expression or a specified value and returns a new string with the given value repleaced

search

Search a string for a value and return the position

slice

exrtact a part of a string

split

split a string in an array of substrings

startsWith

Check if a string start with a given character

substr

Extract the characters from a string, starting from a given start position and for a given number of characters

substring

Extract characters from a string between two given positions

toLocaleLowerCase

Converts a string to lowercase letters, according to the host's locale

toLocaleUpperCase

Converts a string to uppercase letters, according to the host's locale

toLowerCase

Convert a string to lowercase letters

toUpperCase

Converts a string to uppercase letters

toString

Return the value a String object

trim

remove whitespaces from the start and the end of the string

valueOf

return the primitive value of a String object

Categories: Java

Leave a Reply

%d bloggers like this: