code: public static String replaceFirst(final CharSequence self, final CharSequence regex, final CharSequence replacement) {
          return self.toString().replaceFirst(regex.toString(), replacement.toString());
      }
docs: Replaces the first substring of this CharSequence that matches the given
  regular expression with the given replacement.
  
  @param self        a CharSequence
  @param regex       the capturing regex
  @param replacement the CharSequence to be substituted for each match
  @return a CharSequence with replaced content
  @throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid
  @see String#replaceFirst(String, String)
  @since 1.8.2