MCPcopy Create free account
hub / github.com/BruceDevices/firmware / getCommandPromptLength

Function getCommandPromptLength

src/modules/wifi/clients.cpp:411–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409void resetCommandBufferToPrompt() { commandBuffer = getCurrentPromptPrefix(); }
410
411size_t getCommandPromptLength() {
412 String prompt = getCurrentPromptPrefix();
413 if (commandBuffer.startsWith(prompt)) return prompt.length();
414 if (commandBuffer.startsWith("> ")) return 2;
415 return 0;
416}
417
418String getBufferedCommandInput() {
419 size_t promptLength = getCommandPromptLength();

Callers 2

getBufferedCommandInputFunction · 0.85
runSessionUiLoopFunction · 0.85

Calls 1

getCurrentPromptPrefixFunction · 0.85

Tested by

no test coverage detected