src/main/java/com/cloudbees/jenkins/support/util/WordReplacer.java
public static String replaceWord(String input, String word, String replace) {
        StringBuilder sb = new StringBuilder(input);
        replaceWord(sb, word, replace);
        return sb.toString();
    }
/**
     * Replace all occurrences of word by replace in the input. The replacement happens only if the word to replace is
     * separated from others words, that is, it's not part of a word. The implementation is that the previous and next
     * characters of the word must be a {@link Character#isLetterOrDigit(char)} char.
     * @param input text where the replacements take place
     * @param word the word to replace
     * @param replace the new text to use
     */
Replace all occurrences of word by replace in the input. The replacement happens only if the word to replace is
separated from others words, that is, it's not part of a word. The implementation is that the previous and next
characters of the word must be a  Character#isLetterOrDigit(char) char.
@param input text where the replacements take place
@param word the word to replace
@param replace the new text to use
Replace all occurrences of word by replace in the input . The replacement happens only if the word to replace is separated from others words that is it ' s not part of a word . The implementation is that the previous and next characters of the word must be a Character#isLetterOrDigit ( char ) char . @param input text where the replacements take place @param word the word to replace @param replace the new text to use
public static String replaceWord(String input, String word, String replace) {
        StringBuilder sb = new StringBuilder(input);
        replaceWord(sb, word, replace);
        return sb.toString();
    }
public static String replaceWord ( String input , String word , String replace ) { StringBuilder sb = new StringBuilder ( input ) ; replaceWord ( sb , word , replace ) ; return sb . toString ( ) ; }
Replace all occurrences of word by replace in the input.
Replace all occurrences of word by replace in the input .