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

Function ParseLength

base/string/format/specification.cpp:49–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static int ParseLength(const char* format, int* length)
50{
51 const char* f = format;
52 switch (*f) {
53 case 'h':
54 case 'l':
55 if (f[1] == f[0]) {
56 *length = (f[1] << 8) + f[0];
57 f += 2;
58 } else {
59 *length = f[0];
60 ++f;
61 }
62 break;
63 case 'j':
64 case 'z':
65 case 't':
66 case 'L':
67 *length = *f;
68 ++f;
69 break;
70 default:
71 *length = 0;
72 }
73
74 return f - format;
75}
76
77static inline void ScanSetSetChar(char (*cs)[32], char c, bool value)
78{

Callers 1

ParseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected