Home | History | Annotate | Download | only in string.conversions

Lines Matching refs:idx

16 // long stol(const string& str, size_t *idx = 0, int base = 10);
17 // long stol(const wstring& str, size_t *idx = 0, int base = 10);
34 size_t idx = 0;
35 assert(std::stol("10g", &idx, 16) == 16);
36 assert(idx == 2);
37 idx = 0;
38 assert(std::stol(L"10g", &idx, 16) == 16);
39 assert(idx == 2);
41 idx = 0;
44 std::stol("", &idx);
49 assert(idx == 0);
53 std::stol(L"", &idx);
58 assert(idx == 0);
62 std::stol(" - 8", &idx);
67 assert(idx == 0);
71 std::stol(L" - 8", &idx);
76 assert(idx == 0);
80 std::stol("a1", &idx);
85 assert(idx == 0);
89 std::stol(L"a1", &idx);
94 assert(idx == 0);
99 std::stol("9999999999999999999999999999999999999999999999999", &idx);
104 assert(idx == 0);
108 std::stol(L"9999999999999999999999999999999999999999999999999", &idx);
113 assert(idx == 0);