MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / GetTextLines

Method GetTextLines

plugins/Cardinal/src/DearImGuiColorTextEditor/TextEditor.cpp:2100–2119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2098}
2099
2100std::vector<std::string> TextEditor::GetTextLines() const
2101{
2102 std::vector<std::string> result;
2103
2104 result.reserve(mLines.size());
2105
2106 for (auto & line : mLines)
2107 {
2108 std::string text;
2109
2110 text.resize(line.size());
2111
2112 for (size_t i = 0; i < line.size(); ++i)
2113 text[i] = line[i].mChar;
2114
2115 result.emplace_back(std::move(text));
2116 }
2117
2118 return result;
2119}
2120
2121std::string TextEditor::GetSelectedText() const
2122{

Callers 1

getTextLinesMethod · 0.80

Calls 4

emplace_backMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected