MCPcopy Create free account
hub / github.com/LagPixelLOL/ChatGPTCLIBot / read_stdin

Method read_stdin

main/interface/cpp-terminal/input.cpp:184–195  ·  view source on GitHub ↗

Returns the whole input from STDIN as string.

Source from the content-addressed store, hash-verified

182
183//Returns the whole input from STDIN as string.
184std::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}

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected