title: Combining Spannable with String.format()
body: <p>Suppose you have the following string:</p>
  
  <pre><code>String s = "The cold hand reaches for the %1$s %2$s Ellesse's";
  String old = "old"; 
  String tan = "tan"; 
  String formatted = String.format(s,old,tan); //"The cold hand reaches for the old tan Ellesse's"
  </code></pre>
  
  <p>Suppose you want to end up with this string, but also have a particular <a href="https://developer.android.com/reference/android/text/Spannable.html" rel="noreferrer"><code>Span</code></a> set for any word replaced by <code>String.format</code>. </p>
  
  <p>For instance, we also want to do the following:</p>
  
  <pre><code>Spannable spannable = new SpannableString(formatted);
  spannable.setSpan(new StrikethroughSpan(), oldStart, oldStart+old.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
  spannable.setSpan(new ForegroundColorSpan(Color.BLUE), tanStart, tanStart+tan.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
  </code></pre>
  
  <p>Is there a robust way of getting to know the start indices of <code>old</code> and <code>tan</code>? </p>
  
  <p>Note that just searching for 'old' returns the 'old' in 'cold', so that won't work.</p>
  
  <p>What <em>will</em> work, I guess, is searching for <code>%[0-9]$s</code> beforehand, and calculating the offsets to account for the replacements in <code>String.format</code>. This seems like a headache though, I suspect there might be a method like <code>String.format</code> that is more informative about the specifics of its formatting. Well, is there?</p>