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

Function ParseSpecifier

base/string/format/specification.cpp:130–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130static int ParseSpecifier(const char* format, char* specifier)
131{
132 const char* f = format;
133 switch (*f) {
134 case 'A': // float
135 case 'E': // float
136 case 'F': // float
137 case 'G': // float
138 case 'X': // hexadecimal int
139 case 'a': // float
140 case 'b': // bool
141 case 'c': // char
142 case 'd': // decimal int
143 case 'e': // float
144 case 'f': // float
145 case 'g': // float
146 case 'i': // int
147 case 'n': // output size scanned
148 case 'o': // octal int
149 case 'p': // pointer
150 case 's': // string
151 case 'u': // unsigned int
152 case 'v': // Automatic type
153 case 'x': // hexadecimal int
154 *specifier = *f;
155 ++f;
156 break;
157 }
158 return f - format;
159}
160
161static int ParseScanSpecifier(const char* format, ScanSpecification* spec)
162{

Callers 2

ParseScanSpecifierFunction · 0.85
ParsePrintSpecifierFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected