I wonder how I can split a string in the middle, by the closest whitespace, so that it returns only 2 strings. This secures that the string does not split a word.
The text is “Split this string”
I want it to output either:
“Split this” and “string”,
"Split" and “this string”
As long as it does not output more than 2 strings it is the same what it outputs of the above mentioned.
I have tried to use both the Split- and substring functions without getting the desired output.
Any help would be appreciated