Also, it seems to me that 'x' should be prepended and appended to all the strings.
I prepended and appended it only to "split_by" variation, it should guarantee that the amount of returned chunks is +1 of amount of separators (split pattern occurrences). I think it is not relevant for other variations.