public static String replace(String line, String oldString,
            String newString, int[] count) {
        return replace(line, oldString, newString, false, count);
    }
Replaces all instances of oldString with newString in line.
The count Integer is updated with number of replaces.

@param line the String to search to perform replacements on.
@param oldString the String that should be replaced by newString.
@param newString the String that will replace all instances of oldString.
@param count a single element array that, after running, will contain the number of matching items
@return a String will all instances of oldString replaced by newString.
xmppserver/src/main/java/org/jivesoftware/util/StringUtils.java