Lines Matching refs:idx
523 * idx = index of `%` of start of format specifier,
530 Format parseScanfFormatSpecifier(scope const char[] format, ref size_t idx,
533 auto i = idx;
539 idx = i;
549 idx = i + 1;
588 // it could be mixed with the one above, but then idx won't have the right index
600 idx = i;
611 * idx = index of `%` of start of format specifier,
619 Format parsePrintfFormatSpecifier(scope const char[] format, ref size_t idx,
622 auto i = idx;
633 idx = i;
643 idx = i + 1;
760 idx = i;
814 * idx = index of of start of format specifier,
823 ref size_t idx, out char genSpecifier, bool useGNUExts =
830 const lm = format[idx];
838 ++idx;
839 if (idx == length)
845 ++idx;
846 if (idx == length)
848 lm2 = lm == format[idx];
851 ++idx;
852 if (idx == length)
860 const sc = format[idx];
969 ++idx;
979 size_t idx;
981 assert(parseGenericFormatSpecifier("hhd", idx, genSpecifier) == Format.hhd);
984 idx = 0;
985 assert(parseGenericFormatSpecifier("hn", idx, genSpecifier) == Format.hn);
988 idx = 0;
989 assert(parseGenericFormatSpecifier("ji", idx, genSpecifier) == Format.jd);
992 idx = 0;
993 assert(parseGenericFormatSpecifier("lu", idx, genSpecifier) == Format.lu);
996 idx = 0;
997 assert(parseGenericFormatSpecifier("k", idx, genSpecifier) == Format.error);
1006 idx = 0;
1007 assert(parsePrintfFormatSpecifier("%d", idx, widthStar, precisionStar) == Format.d);
1008 assert(idx == 2);
1011 idx = 0;
1012 assert(parsePrintfFormatSpecifier("%ld", idx, widthStar, precisionStar) == Format.ld);
1013 assert(idx == 3);
1015 idx = 0;
1016 assert(parsePrintfFormatSpecifier("%lld", idx, widthStar, precisionStar) == Format.lld);
1017 assert(idx == 4);
1019 idx = 0;
1020 assert(parsePrintfFormatSpecifier("%jd", idx, widthStar, precisionStar) == Format.jd);
1021 assert(idx == 3);
1023 idx = 0;
1024 assert(parsePrintfFormatSpecifier("%zd", idx, widthStar, precisionStar) == Format.zd);
1025 assert(idx == 3);
1027 idx = 0;
1028 assert(parsePrintfFormatSpecifier("%td", idx, widthStar, precisionStar) == Format.td);
1029 assert(idx == 3);
1031 idx = 0;
1032 assert(parsePrintfFormatSpecifier("%g", idx, widthStar, precisionStar) == Format.g);
1033 assert(idx == 2);
1035 idx = 0;
1036 assert(parsePrintfFormatSpecifier("%Lg", idx, widthStar, precisionStar) == Format.Lg);
1037 assert(idx == 3);
1039 idx = 0;
1040 assert(parsePrintfFormatSpecifier("%p", idx, widthStar, precisionStar) == Format.p);
1041 assert(idx == 2);
1043 idx = 0;
1044 assert(parsePrintfFormatSpecifier("%n", idx, widthStar, precisionStar) == Format.n);
1045 assert(idx == 2);
1047 idx = 0;
1048 assert(parsePrintfFormatSpecifier("%ln", idx, widthStar, precisionStar) == Format.ln);
1049 assert(idx == 3);
1051 idx = 0;
1052 assert(parsePrintfFormatSpecifier("%lln", idx
1053 assert(idx == 4);
1055 idx = 0;
1056 assert(parsePrintfFormatSpecifier("%hn", idx, widthStar, precisionStar) == Format.hn);
1057 assert(idx == 3);
1059 idx = 0;
1060 assert(parsePrintfFormatSpecifier("%hhn", idx, widthStar, precisionStar) == Format.hhn);
1061 assert(idx == 4);
1063 idx = 0;
1064 assert(parsePrintfFormatSpecifier("%jn", idx, widthStar, precisionStar) == Format.jn);
1065 assert(idx == 3);
1067 idx = 0;
1068 assert(parsePrintfFormatSpecifier("%zn", idx, widthStar, precisionStar) == Format.zn);
1069 assert(idx == 3);
1071 idx = 0;
1072 assert(parsePrintfFormatSpecifier("%tn", idx, widthStar, precisionStar) == Format.tn);
1073 assert(idx == 3);
1075 idx = 0;
1076 assert(parsePrintfFormatSpecifier("%c", idx, widthStar, precisionStar) == Format.c);
1077 assert(idx == 2);
1079 idx = 0;
1080 assert(parsePrintfFormatSpecifier("%lc", idx, widthStar, precisionStar) == Format.lc);
1081 assert(idx == 3);
1083 idx = 0;
1084 assert(parsePrintfFormatSpecifier("%s", idx, widthStar, precisionStar) == Format.s);
1085 assert(idx == 2);
1087 idx = 0;
1088 assert(parsePrintfFormatSpecifier("%ls", idx, widthStar, precisionStar) == Format.ls);
1089 assert(idx == 3);
1091 idx = 0;
1092 assert(parsePrintfFormatSpecifier("%%", idx, widthStar, precisionStar) == Format.percent);
1093 assert(idx == 2);
1096 idx = 0;
1097 assert(parsePrintfFormatSpecifier("%i", idx, widthStar, precisionStar) == Format.d);
1098 assert(idx == 2);
1100 idx = 0;
1101 assert(parsePrintfFormatSpecifier("%u", idx, widthStar, precisionStar) == Format.u);
1102 assert(idx == 2);
1104 idx = 0;
1105 assert(parsePrintfFormatSpecifier("%o", idx, widthStar, precisionStar) == Format.u);
1106 assert(idx == 2);
1108 idx = 0;
1109 assert(parsePrintfFormatSpecifier("%x", idx, widthStar, precisionStar) == Format.u);
1110 assert(idx == 2);
1112 idx = 0;
1113 assert(parsePrintfFormatSpecifier("%X", idx, widthStar, precisionStar) == Format.u);
1114 assert(idx == 2);
1116 idx = 0;
1117 assert(parsePrintfFormatSpecifier("%f", idx, widthStar, precisionStar) == Format.g);
1118 assert(idx == 2);
1120 idx = 0;
1121 assert(parsePrintfFormatSpecifier("%F", idx, widthStar, precisionStar) == Format.g);
1122 assert(idx == 2);
1124 idx = 0;
1125 assert(parsePrintfFormatSpecifier("%G", idx, widthStar, precisionStar) == Format.g);
1126 assert(idx == 2);
1128 idx = 0;
1129 Format g = parsePrintfFormatSpecifier("%a", idx, widthStar, precisionStar);
1131 assert(idx == 2);
1133 idx = 0;
1134 assert(parsePrintfFormatSpecifier("%A", idx, widthStar, precisionStar) == Format.g);
1135 assert(idx == 2);
1137 idx = 0;
1138 assert(parsePrintfFormatSpecifier("%lg", idx, widthStar, precisionStar) == Format.lg);
1139 assert(idx == 3);
1142 idx = 0;
1143 assert(parsePrintfFormatSpecifier("%*d", idx, widthStar, precisionStar) == Format.d);
1144 assert(idx == 3);
1147 idx = 0;
1148 assert(parsePrintfFormatSpecifier("%.*d", idx, widthStar, precisionStar) == Format.d);
1149 assert(idx == 4);
1152 idx = 0;
1153 assert(parsePrintfFormatSpecifier("%*.*d", idx, widthStar, precisionStar) == Format.d);
1154 assert(idx == 5);
1162 idx = 0;
1163 assert(parsePrintfFormatSpecifier(s, idx, widthStar, precisionStar) == Format.error);
1164 assert(idx == s.length);
1176 idx = 0;
1177 assert(parsePrintfFormatSpecifier(s, idx, widthStar, precisionStar) == Format.error);
1178 assert(idx == s.length);
1188 idx = 0;
1189 assert(parseScanfFormatSpecifier("%d", idx, asterisk) == Format.d);
1190 assert(idx == 2);
1193 idx = 0;
1194 assert(parseScanfFormatSpecifier("%hhd", idx, asterisk) == Format.hhd);
1195 assert(idx == 4);
1197 idx = 0;
1198 assert(parseScanfFormatSpecifier("%hd", idx, asterisk) == Format.hd);
1199 assert(idx == 3);
1201 idx = 0;
1202 assert(parseScanfFormatSpecifier("%ld", idx, asterisk) == Format.ld);
1203 assert(idx == 3);
1205 idx = 0;
1206 assert(parseScanfFormatSpecifier("%lld", idx, asterisk) == Format.lld);
1207 assert(idx == 4);
1209 idx = 0;
1210 assert(parseScanfFormatSpecifier("%jd", idx, asterisk) == Format.jd);
1211 assert(idx == 3);
1213 idx = 0;
1214 assert(parseScanfFormatSpecifier("%zd", idx, asterisk) == Format.zd);
1215 assert(idx == 3);
1217 idx = 0;
1218 assert(parseScanfFormatSpecifier("%td", idx, asterisk,) == Format.td);
1219 assert(idx == 3);
1221 idx = 0;
1222 assert(parseScanfFormatSpecifier("%u", idx, asterisk) == Format.u);
1223 assert(idx == 2);
1225 idx = 0;
1226 assert(parseScanfFormatSpecifier("%hhu", idx, asterisk,) == Format.hhu);
1227 assert(idx == 4);
1229 idx = 0;
1230 assert(parseScanfFormatSpecifier("%hu", idx, asterisk) == Format.hu);
1231 assert(idx == 3);
1233 idx = 0;
1234 assert(parseScanfFormatSpecifier("%lu", idx, asterisk) == Format.lu);
1235 assert(idx == 3);
1237 idx = 0;
1238 assert(parseScanfFormatSpecifier("%llu", idx, asterisk) == Format.llu);
1239 assert(idx == 4);
1241 idx = 0;
1242 assert(parseScanfFormatSpecifier("%ju", idx, asterisk) == Format.ju);
1243 assert(idx == 3);
1245 idx = 0;
1246 assert(parseScanfFormatSpecifier("%g", idx, asterisk) == Format.g);
1247 assert(idx == 2);
1249 idx = 0;
1250 assert(parseScanfFormatSpecifier("%lg", idx, asterisk) == Format.lg);
1251 assert(idx == 3);
1253 idx = 0;
1254 assert(parseScanfFormatSpecifier("%Lg", idx, asterisk) == Format.Lg);
1255 assert(idx == 3);
1257 idx = 0;
1258 assert(parseScanfFormatSpecifier("%p", idx, asterisk) == Format.p);
1259 assert(idx == 2);
1261 idx = 0;
1262 assert(parseScanfFormatSpecifier("%s", idx, asterisk) == Format.s);
1263 assert(idx == 2);
1265 idx = 0;
1266 assert(parseScanfFormatSpecifier("%ls", idx, asterisk,) == Format.ls);
1267 assert(idx == 3);
1269 idx = 0;
1270 assert(parseScanfFormatSpecifier("%%", idx, asterisk) == Format.percent);
1271 assert(idx == 2);
1274 idx = 0;
1275 assert(parseScanfFormatSpecifier("%i", idx, asterisk) == Format.d);
1276 assert(idx == 2);
1278 idx = 0;
1279 assert(parseScanfFormatSpecifier("%n", idx, asterisk) == Format.n);
1280 assert(idx == 2);
1282 idx = 0;
1283 assert(parseScanfFormatSpecifier("%o", idx, asterisk) == Format.u);
1284 assert(idx == 2);
1286 idx = 0;
1287 assert(parseScanfFormatSpecifier("%x", idx, asterisk) == Format.u);
1288 assert(idx == 2);
1290 idx = 0;
1291 assert(parseScanfFormatSpecifier("%f", idx, asterisk) == Format.g);
1292 assert(idx == 2);
1294 idx = 0;
1295 assert(parseScanfFormatSpecifier("%e", idx, asterisk) == Format.g);
1296 assert(idx == 2);
1298 idx = 0;
1299 g = parseScanfFormatSpecifier("%a", idx, asterisk);
1301 assert(idx == 2);
1303 idx = 0;
1304 assert(parseScanfFormatSpecifier("%c", idx, asterisk) == Format.c);
1305 assert(idx == 2);
1308 idx = 0;
1309 assert(parseScanfFormatSpecifier("%*d", idx, asterisk) == Format.d);
1310 assert(idx == 3);
1313 idx = 0;
1314 assert(parseScanfFormatSpecifier("%9ld", idx, asterisk) == Format.ld);
1315 assert(idx == 4);
1318 idx = 0;
1319 assert(parseScanfFormatSpecifier("%*25984hhd", idx, asterisk) == Format.hhd);
1320 assert(idx == 10);
1324 idx = 0;
1325 assert(parseScanfFormatSpecifier("%[a-zA-Z]s", idx, asterisk) == Format.s);
1326 assert(idx == 10);
1329 idx = 0;
1330 assert(parseScanfFormatSpecifier("%*25[a-z]hhd", idx, asterisk) == Format.hhd);
1331 assert(idx == 12);
1338 idx = 0;
1339 assert(parseScanfFormatSpecifier(s, idx, asterisk) == Format.error);
1340 assert(idx == s.length);
1350 idx = 0;
1351 assert(parseScanfFormatSpecifier(s, idx, asterisk) == Format.error);
1352 assert(idx == s.length);
1359 idx = 0;
1360 assert(parseScanfFormatSpecifier(s, idx, asterisk) == Format.error);
1361 assert(idx == s.length);