MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / trim_text

Function trim_text

src/command/edit.cpp:932–939  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

930
931namespace {
932std::string trim_text(std::string text) {
933 boost::regex start(R"(^( | |\\[nNh])+)");
934 boost::regex end(R"(( | |\\[nNh])+$)");
935
936 text = regex_replace(text, start, "", boost::format_first_only);
937 text = regex_replace(text, end, "", boost::format_first_only);
938 return text;
939}
940
941void expand_times(AssDialogue *src, AssDialogue *dst) {
942 dst->Start = std::min(dst->Start, src->Start);

Callers 3

check_startFunction · 0.85
check_endFunction · 0.85
operator()Function · 0.85

Calls 1

regex_replaceFunction · 0.85

Tested by

no test coverage detected