str, str StrSplit(str s, str separator)
Finds the first instance of separator and returns text before and after the separator. If the separator is not found, returns (s, "")
.
StrSplit("abcdefghi", "def"); r1 -> "abc" r2 -> "ghi" StrSplit("defghi", "def"); // Nothing before separtor r1 -> ""; r2 -> "ghi"; StrSplit("abcdef", "def"); // Nothing after separator r1 -> "abc"; r2 -> ""; StrSplit("abc", "def"); // Not found r1 -> "abc"; r2 -> "";