I'm new to go and have been using split to my advantage. Recently I came across a problem I wanted to split something, and keep the splitting char in my second slice rather than removing it, or leaving it in the first slice as with SplitAfter.
For example the following code:
strings.Split("email@email.com", "@")
returned: ["email", "email.com"]
strings.SplitAfter("email@email.com", "@")
returned: ["email@", "email.com"]
What's the best way to get ["email", "@email.com"]
?