MCPcopy Create free account
hub / github.com/VCVRack/Rack / getSelectedText

Method getSelectedText

src/ui/TextField.cpp:342–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342std::string TextField::getSelectedText() {
343 int begin = std::min(cursor, selection);
344 int len = std::abs(selection - cursor);
345 return text.substr(begin, len);
346}
347
348void TextField::insertText(std::string text) {
349 // Rack uses UNIX newlines so remove all CR characters

Callers

nothing calls this directly

Calls 2

minFunction · 0.85
absFunction · 0.85

Tested by

no test coverage detected