"Your String".split("\\s{2,}");
will do the job.
For instance:
String str = "I am a String"; String []strArr = str.split("\\s{2,}");
This will return an array of length 3.
The following will be the conclusion.
strArr[0] = "I am" strArr[1] = "a" strArr[2] = "String"
Hope this answers your question.
Vyper source share