MCPcopy Create free account
hub / github.com/catboost/catboost / ShellQuoteArg

Function ShellQuoteArg

util/system/shellcommand.cpp:602–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600#endif
601
602void ShellQuoteArg(TString& dst, TStringBuf argument) {
603 dst.append("\"");
604 TStringBuf l, r;
605 while (argument.TrySplit('"', l, r)) {
606 dst.append(l);
607 dst.append("\\\"");
608 argument = r;
609 }
610 dst.append(argument);
611 dst.append("\"");
612}
613
614void ShellQuoteArgSp(TString& dst, TStringBuf argument) {
615 dst.append(' ');

Callers 2

Y_UNIT_TESTFunction · 0.85
ShellQuoteArgSpFunction · 0.85

Calls 2

TrySplitMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected