Advertisement
rakiru

Untitled

Jan 16th, 2012
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for (Entry entry : commands.entrySet()) {
  2.     if (myString.contains(entry.getKey())) {
  3.         myString.replace(entry.getKey(), entry.getValue());
  4.         //Other magic
  5.     }
  6. }
  7.  
  8. //OR, if you don't need any other magic:
  9.  
  10. for (Entry entry : commands.entrySet()) {
  11.     myString.replace(entry.getKey(), entry.getValue());
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement