/** * Replaces every occurance of find with replace in aStr * Parameters: * AStr = a string in which the replacement is to occur * find = the substring that will be replaced * replace = the substring that replaces find * Returns: The revised string */ String replaceAll(String aStr, String find, String replace) { String[] s; int i; String result; s = split(aStr, find); result = s[0]; for (i = 1; i < s.length; i++) result += replace + s[i]; return result; } // replaceAll