code: public static String substringByCodepoints(String s, int startIndexInclusive,
        int endIndexExclusive) {
      return substringByCodepoints(s, startIndexInclusive, endIndexExclusive, false);
    }
docs: Returns the substring of {@code s} which starts at the Unicode codepoint offset at
  {@code startIndexInclusive} and ends before the Unicode codepoint offset at
  {@code endIndexExclusive}. You should typically use this instead
  of {@link String#substring(int)} because the latter will fail badly in the presence of
  non-BMP characters.
  
  Beware this takes linear time according to the end index of the substring, rather than the
  substring's length, like for {@link String#substring(int)}