SHOW:
|
|
- or go back to the newest paste.
| 1 | for (Entry entry : commands.entrySet()) {
| |
| 2 | - | if (entry.getValue().equals("lol")) {
|
| 2 | + | if (myString.contains(entry.getKey())) {
|
| 3 | - | //Do stuff here |
| 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 | } |