In a string to format (mostly to replace chars with different symbols for rendering test on UI), I have to detect % and then skip all chars util first space from this % char
Following is easiest, and extensible, for your requirement "abcd%1$s efgh %2$d ijkl
in this string I have to skip this %1$s
& %2$d
which are some sort of formatting placeholders."
string[] placeHolders = new string[] {"%1$s", "%2$d"};
string[] splits = "abcd%1$s efgh %2$d ijkl".Split(placeHolders, StringSplitOptions.None);
which will provide splits
as ["abcd", "efgh", "ijkl"]