code: private String alterPrefix(String word, String oldPrefix, String newPrefix) {
  
          if (word.startsWith(oldPrefix)) {
              return word.replaceFirst(oldPrefix, newPrefix);
          }
          return (newPrefix + word);
      }
docs: Manipulates a string by cutting of a prefix, if present, and adding a new prefix.
  
  @param word the string to be manipulated
  @param oldPrefix the old prefix that should be replaced
  @param newPrefix the new prefix that is added
  @return the manipulated string