Returns the whole input from STDIN as string.
| 182 | |
| 183 | //Returns the whole input from STDIN as string. |
| 184 | std::string Term::read_stdin() { |
| 185 | std::string file; |
| 186 | char c; //No need to initialize. |
| 187 | while (true) { |
| 188 | c = Platform::read_raw_stdin(); |
| 189 | if (c == 0x04) { |
| 190 | return file; |
| 191 | } else { |
| 192 | file.push_back(c); |
| 193 | } |
| 194 | } |
| 195 | } |