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)
| 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. |