The split() method takes a pattern and divides a String into an ordered list of substrings by searching for the pattern:
"Hello TC39 Discourse Group".split(" ");
Output: ['Hello', 'TC39', 'Discourse', 'Group']
But sometimes we need to divide a String into 2 parts by searching for the pattern:
"Hello TC39 Discourse Group".splitLeft(" ");
Output: ['Hello', 'TC39 Discourse Group']
and splitRight
"Hello TC39 Discourse Group".splitRight(" ");
Output: ['Hello TC39 Discourse', 'Group']