Parameters string is any string. Method of String object Description start is a character index. The index of the first character is zero, and the index of the last character is stringName .length -1. If length is 0 or negative, no string is extracted. If length is omitted, start extracts characters to the end of the string.
Parameters string is any string.
If indexA is less than zero, indexA is treated as if it were 0. If indexB is greater than stringName .length, indexB is treated as if it were stringName .length. If indexA equals indexB, substring returns an empty string. If indexB is omitted, indexA extracts characters to the end of the string. In the second write, the index numbers are swapped.