MCPcopy Create free account
hub / github.com/chen3feng/toft / ParseScanSpecifier

Function ParseScanSpecifier

base/string/format/specification.cpp:161–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161static int ParseScanSpecifier(const char* format, ScanSpecification* spec)
162{
163 const char* f = format;
164 int n = ParseSpecifier(f, &spec->specifier);
165 if (n > 0)
166 return n;
167
168 if (*f == '[') {
169 int width = ParseScanSet(f + 1, &spec->scanset);
170 if (width > 0) {
171 spec->specifier = '[';
172 f += width + 1;
173 }
174 } else {
175 LOG(DFATAL) << "Invalid scan specifier: " << f[0];
176 }
177
178 return f - format;
179}
180
181static int ParsePrintSpecifier(const char* format, char* specifier)
182{

Callers 1

ParseMethod · 0.85

Calls 2

ParseSpecifierFunction · 0.85
ParseScanSetFunction · 0.85

Tested by

no test coverage detected