Your line is "geekss @for @geekss", so if you consider "s" as your separator, you get:
"geek" + ['s'] + "+ ['s'] +" @for @geek "+ ['s']" + ['s'] + ""
So, you have ["geek", "", "@ for@geek ", "", ""]
Perhaps the part that confuses you is the last empty line. Think that the delimiter is always "contained" in a string. Therefore, if this happens at the end, it is actually considered "your_string" + your_delimiter + "" .
The same thing happens if your line starts with "s": in this case, the first element of your split array will be "".
source share