MCPcopy Create free account
hub / github.com/dirkvranckaert/AndroidDecompiler / extractPreprocessorStatement

Method extractPreprocessorStatement

astyle/src/ASBeautifier.cpp:2090–2101  ·  view source on GitHub ↗

* Extract a preprocessor statement without the #. * If a error occurs an empty string is returned. */

Source from the content-addressed store, hash-verified

2088 * If a error occurs an empty string is returned.
2089 */
2090string ASBeautifier::extractPreprocessorStatement(const string &line) const
2091{
2092 string preproc;
2093 size_t start = line.find_first_not_of("#/ \t");
2094 if (start == string::npos)
2095 return preproc;
2096 size_t end = line.find_first_of("/ \t", start);
2097 if (end == string::npos)
2098 end = line.length();
2099 preproc = line.substr(start, end - start);
2100 return preproc;
2101}
2102
2103/**
2104 * Clear the variables used to align the Objective-C method definitions.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected