MCPcopy Create free account
hub / github.com/DanielSWolf/rhubarb-lip-sync / wrapString

Function wrapString

rhubarb/src/tools/stringTools.cpp:80–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80vector<string> wrapString(const string& s, int lineLength, int hangingIndent) {
81 vector<string> lines;
82 for (const string& paragraph : splitIntoLines(s)) {
83 auto paragraphLines = wrapSingleLineString(paragraph, lineLength, hangingIndent);
84 copy(paragraphLines.cbegin(), paragraphLines.cend(), back_inserter(lines));
85 }
86
87 return lines;
88}
89
90bool isValidUtf8(const string& s) {
91 return utf8::is_valid(s.begin(), s.end());

Callers 2

printRowMethod · 0.85
TESTFunction · 0.85

Calls 4

splitIntoLinesFunction · 0.85
wrapSingleLineStringFunction · 0.85
cbeginMethod · 0.45
cendMethod · 0.45

Tested by 1

TESTFunction · 0.68