MCPcopy Create free account
hub / github.com/google/re2j / appendReplacement

Method appendReplacement

java/com/google/re2j/Matcher.java:445–450  ·  view source on GitHub ↗

Appends to sb two strings: the text from the append position up to the beginning of the most recent match, and then the replacement with submatch groups substituted for references of the form $n, where n is the group number in decimal. It advances the append position to where

(StringBuffer sb, String replacement)

Source from the content-addressed store, hash-verified

443 * @throws IndexOutOfBoundsException if replacement refers to an invalid group
444 */
445 public Matcher appendReplacement(StringBuffer sb, String replacement) {
446 StringBuilder result = new StringBuilder();
447 appendReplacement(result, replacement);
448 sb.append(result);
449 return this;
450 }
451
452 /**
453 * Appends to {@code sb} two strings: the text from the append position up to the beginning of the

Calls 5

startMethod · 0.95
endMethod · 0.95
substringMethod · 0.95
appendMethod · 0.80