[*] fix ns (<1s) padding

This commit is contained in:
Reece Wilson 2023-04-05 08:30:20 +01:00
parent 6c25b5a5e6
commit c6971efab7

View File

@ -71,12 +71,11 @@ namespace Aurora::Locale
AuString ret = in;
switch (ret.size())
{
case 1: ret.insert(0, "000000", 6); break;
case 2: ret.insert(0, "000000", 5); break;
case 3: ret.insert(0, "000000", 4); break;
case 4: ret.insert(0, "000000", 3); break;
case 5: ret.insert(0, "000000", 2); break;
case 6: ret.insert(0, "000000", 1); break;
case 1: ret.insert(0, "000000", 5); break;
case 2: ret.insert(0, "000000", 4); break;
case 3: ret.insert(0, "000000", 3); break;
case 4: ret.insert(0, "000000", 2); break;
case 5: ret.insert(0, "000000", 1); break;
}
while (ret.size() > 1 && ret[ret.size() - 1] == '0')
ret.pop_back();