text
stringlengths 0
2.2M
|
---|
key_ = StringPiece(b, end);
|
return;
|
}
|
key_ = StringPiece(b, p);
|
if (*p == ':') {
|
// parse format spec
|
if (++p == end) {
|
return;
|
}
|
// fill/align, or just align
|
Align a;
|
if (p + 1 != end &&
|
(a = formatAlignTable[static_cast<unsigned char>(p[1])]) !=
|
Align::INVALID) {
|
fill = *p;
|
align = a;
|
p += 2;
|
if (p == end) {
|
return;
|
}
|
} else if (
|
(a = formatAlignTable[static_cast<unsigned char>(*p)]) !=
|
Align::INVALID) {
|
align = a;
|
if (++p == end) {
|
return;
|
}
|
}
|
Sign s;
|
auto uSign = static_cast<unsigned char>(*p);
|
if ((s = formatSignTable[uSign]) != Sign::INVALID) {
|
sign = s;
|
if (++p == end) {
|
return;
|
}
|
}
|
if (*p == '#') {
|
basePrefix = true;
|
if (++p == end) {
|
return;
|
}
|
}
|
if (*p == '0') {
|
enforce(align == Align::DEFAULT, "alignment specified twice");
|
fill = '0';
|
align = Align::PAD_AFTER_SIGN;
|
if (++p == end) {
|
return;
|
}
|
}
|
auto readInt = [&] {
|
auto const c = p;
|
do {
|
++p;
|
} while (p != end && *p >= '0' && *p <= '9');
|
return to<int>(StringPiece(c, p));
|
};
|
if (*p == '*') {
|
width = kDynamicWidth;
|
++p;
|
if (p == end) {
|
return;
|
}
|
if (*p >= '0' && *p <= '9') {
|
widthIndex = readInt();
|
}
|
if (p == end) {
|
return;
|
}
|
} else if (*p >= '0' && *p <= '9') {
|
width = readInt();
|
if (p == end) {
|
return;
|
}
|
}
|
if (*p == ',') {
|
thousandsSeparator = true;
|
if (++p == end) {
|
return;
|
}
|
}
|
if (*p == '.') {
|
auto d = ++p;
|
while (p != end && *p >= '0' && *p <= '9') {
|
++p;
|
}
|
if (p != d) {
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.