MCPcopy Create free account
hub / github.com/apache/commons-lang / replace

Method replace

src/main/java/org/apache/commons/lang3/Strings.java:1261–1263  ·  view source on GitHub ↗

Replaces all occurrences of a String within another String. A null reference passed to this method is a no-op. Case-sensitive examples Strings.CS.replace(null, , ) = null Strings.CS.replace("", , ) = "" Strings.CS.replace("any", null, ) = "any" S

(final String text, final String searchString, final String replacement)

Source from the content-addressed store, hash-verified

1259 * @return the text with any replacements processed, {@code null} if null String input
1260 */
1261 public String replace(final String text, final String searchString, final String replacement) {
1262 return replace(text, searchString, replacement, -1);
1263 }
1264
1265 /**
1266 * Replaces a String with another String inside a larger String, for the first {@code max} values of the search String.

Callers 12

removeMethod · 0.95
replaceOnceMethod · 0.95
defineSimpleClassMethod · 0.45
getExpectedToStringMethod · 0.45
testFormatMethod · 0.45
translateMethod · 0.45
translateMethod · 0.45
packageToPathMethod · 0.45
pathToPackageMethod · 0.45
getShortClassNameMethod · 0.45

Calls 6

isEmptyMethod · 0.95
indexOfMethod · 0.95
initialCapacityMethod · 0.95
lengthMethod · 0.45
appendMethod · 0.45
toStringMethod · 0.45