| Author | DaveJarvis <email> |
|---|---|
| Date | 2022-12-08 20:10:31 GMT-0800 |
| Commit | f010d61f5eb9b176f76bf27a783cbd2a1409deca |
| Parent | 4ff41f7 |
| Delta | 6 lines added, 0 lines removed, 6-line increase |
| @Override | ||
| public String replace( final String text, final Map<String, String> map ) { | ||
| + assert text != null; | ||
| + assert map != null; | ||
| + | ||
| // Create a buffer sufficiently large that re-allocations are minimized. | ||
| final var sb = new StringBuilder( (int) (text.length() * 1.25) ); |
| public static String replace( | ||
| final String haystack, final Map<String, String> needles ) { | ||
| + assert haystack != null; | ||
| + assert needles != null; | ||
| + | ||
| return getTextReplacer( haystack.length() ).replace( haystack, needles ); | ||
| } |