The built-in split() function can parse any string into elements of an array. The split(string, arr, fs) function splits the string value of str into fields and stores them in the arr array. The number of fields produced is returned as the value of the split function. The string value of the third argument, fs, determines the field separator. The syntax of split() functions is as follows, followed by a listed explanation of the elements involved:
n = split (str, arr, fs)
- str: This is the input string to be parsed into the elements of the named arr.
- arr: This is the name of the array.
- fs: This is the separator character based on which the array elements are split. If the separator is not given, ...