• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

String Object

String Object

Method Description Parameters
new String (value ) Creates a new String object. value , the value of the String object
charAt (index ) Returns the character at a specific index. index , the position of the character
charCodeAt (index ) Returns the character code at a specific index. index , the position of the character
concat (string1,…,stringN ) Combines the contents of the specified strings. string1, …,stringN , the strings to be concatenated
fromCharCode (num1,…,numN ) Returns a string made up of the specified elements. num1,…,numN , the characters to be made into a string
indexOf (searchString, fromIndex ) Returns the index of the first occurrence of a specified character or substring. searchString , the character or characters fromIndex , the starting index
lastIndexOf (searchstring, fromIndex ) Returns the index of the last occurrence of a specified character or substring. searchstring , the character or characters fromIndex , the starting index
slice (indexA, indexB ) Returns a substring between the specified indices including indexA but not including indexB . indexA , the start of the substring indexB , the end of the substring
split (separator, limit ) Returns an array of two or more substrings based on the separator. separator , the character that separates the substrings limit , the maximum number of substrings to be put in the array
substr (start, length ) Returns a substring of a certain length starting at the specified index. start , the starting index length , the length of the substring
substring (indexA, indexB ) Returns a substring between the specified indices. indexA , the start of the substring indexB , the end of the substring
toLowerCase() Returns a string with all lowercase characters. 
toUpperCase() Returns a string with all uppercase characters. 
Property Description
length The number of characters in a string (read-only)



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint