substring():

.substring(Start, End);
The substring() method returns the part of the string between the start and end indexes, or to the end of the string.

Example 1:
SampleString = "Hello 123";
SubString = SampleString.substring(0, 7);
The result of SubString is “Hello 1”

Example 2:
SampleString = "Hello 123";
SubString = SampleString.substring(6, 9);
The result of SubString is “123”



indexOf():

.indexOf("String")
The indexOf() method returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex. Returns -1 if the value is not found.

Example 1:
SampleString = "Hello 123";
IndexOf = SampleString.indexOf("Hello");
The result of IndexOf is “0”

Example 2:
SampleString = "Hello 123";
IndexOf = SampleString.indexOf("123");
The result of IndexOf is “6”

Example 3:
SampleString = "Hello 123";
IndexOf = SampleString.indexOf("L");
The result of IndexOf is “-1”, means no match found.
IndexOf is case sensitive. By using “l” the result will be “2”.



charAt():

. charAt(Index)
The String object’s charAt() method returns a new string consisting of the single UTF-16 code unit located at the specified offset into the string.

Example 1:
SampleString = "Hello 123";
CharAt = SampleString.charAt(0);
The result of CharAt is “H”

Example 2:
SampleString = "Hello 123";
CharAt = SampleString.charAt(4);
The result of CharAt is “o”



charCodeAt():

. charCodeAt(Index)
The charCodeAt() method returns an integer between 0 and 65535 representing the UTF-16 code unit at the given index.

Example 1:
SampleString = "Hello 123";
CharCodeAt = SampleString.charCodeAt(0);
The result of CharCodeAt is “72”

Example 2:
SampleString = "Hello 123";
CharCodeAt = SampleString.charCodeAt(4);
The result of CharCodeAt is “111”



fromCharCode():

. fromCharCode(num1, num2, …, numN)
The static String.fromCharCode() method returns a string created from the specified sequence of UTF-16 code units.

Example 1:
SampleString.fromCharCode(72);
The result of SampleString is “H”

Example 2:
SampleString.fromCharCode(72, 101, 108, 108, 111);
The result of SampleString is “Hello”



split():

. split("Char")
The split() method divides a String into an ordered list of substrings, puts these substrings into an array, and returns the array. The division is done by searching for a pattern; where the pattern is provided as the first parameter in the method’s call.

Example 1:
SampleString = "Hello 123";
Split = SampleString.split(" ");
The result of Split is a array. Split[0 ] = “Hello”, Split[1 ] = “123”.

Example 2:
SampleString = "Hello,123,SP";
Split = SampleString.split(",");
The result of Split is a array. Split[0 ] = “Hello”, Split[1 ] = “123”, Split[2 ] = “SP”.