MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / TrimTrailingWhitespace

Function TrimTrailingWhitespace

formatter/generic/genericformatter.cpp:69–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68
69static string TrimTrailingWhitespace(const string& str)
70{
71 if (str.empty())
72 return str;
73
74 size_t endPos = str.size();
75 for (size_t i = str.size() - 1; i > 0; i--)
76 {
77 if (!isspace(str[i]))
78 {
79 endPos = i + 1;
80 break;
81 }
82 }
83 return str.substr(0, endPos);
84}
85
86
87static const map<string, BNOperatorPrecedence> g_operatorPrecedenceMap = {{"=", AssignmentOperatorPrecedence},

Callers 1

FormatLinesMethod · 0.85

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected