title: Get index of first detected space after a certain index in a string
body: <p>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 and it has to be repeated for all instances in the string.</p>
  
  <p><strong>E.g.</strong> <code>abcd%1$s efgh %2$d ijkl</code> .In this string, I have to get index of % and then find index of first space from that. Basically, I have to skip this <code>%1$s</code> &amp; <code>%2$d</code> which are some sort of formatting placeholders. I hope, I am not putting it in complex way here.</p>