code: public static String[] spansToStrings(Error[] spans, CharSequence s) {
      String[] tokens = new String[spans.length];
  
      for (int si = 0, sl = spans.length; si < sl; si++) {
        tokens[si] = spans[si].getCoveredText(s).toString();
      }
  
      return tokens;
    }
docs: Converts an array of {@link Error}s to an array of {@link String}s.
  
  @param spans
  @param s
  @return the strings