Grabs the substring after the ':', this is the Key */
| 80 | |
| 81 | /* Grabs the substring after the ':', this is the Key */ |
| 82 | string getKeyFromString(string line) |
| 83 | { |
| 84 | string key; |
| 85 | unsigned int colonIndex = line.find(":"); |
| 86 | if(colonIndex == string::npos) |
| 87 | return ""; |
| 88 | |
| 89 | key = line.substr(colonIndex+1); |
| 90 | |
| 91 | return key; |
| 92 | } |
| 93 | |
| 94 | /* Returns a keymap consisting of the default |
| 95 | * keybinds specified with the -k option |