Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String command = null;
- if (line.contains(" ")) {
- command = line.trim().substring(0, line.indexOf(' ')).toUpperCase();
- } else {
- command = line.trim().toUpperCase();
- }
- vs
- val cmd = (if(line.contains(" ")) line.substring(0,line.indexOf(" ")) else line).trim.toUpperCase
Add Comment
Please, Sign In to add comment