I am trying to make a function that takes a string and a delimiter and splits the string it into an array, while keeping the delimiter, using case insensitivity for the search, and preserving original case.
For example, the function signature should look like:
advanced_split("Test Round Start", "St")
And it should return:
["Te", "st", " Round ", "St", "art"]
Note that the splitting is done using case insensitivity, but the case in the original string is preserved in the output array.