mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Add base 12 in strconv.odin
This commit is contained in:
+1
-1
@@ -498,7 +498,7 @@ _write_int :: proc(fi: ^Fmt_Info, u: u64, base: int, is_signed: bool, bit_size:
|
|||||||
}
|
}
|
||||||
|
|
||||||
match base {
|
match base {
|
||||||
case 2, 8, 10, 16:
|
case 2, 8, 10, 12, 16:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
panic("_write_int: unknown base, whoops");
|
panic("_write_int: unknown base, whoops");
|
||||||
|
|||||||
@@ -342,6 +342,7 @@ append_bits :: proc(buf: []byte, u: u64, base: int, is_signed: bool, bit_size: i
|
|||||||
case 2: i--; a[i] = 'b';
|
case 2: i--; a[i] = 'b';
|
||||||
case 8: i--; a[i] = 'o';
|
case 8: i--; a[i] = 'o';
|
||||||
case 10: i--; a[i] = 'd';
|
case 10: i--; a[i] = 'd';
|
||||||
|
case 12: i--; a[i] = 'z';
|
||||||
case 16: i--; a[i] = 'x';
|
case 16: i--; a[i] = 'x';
|
||||||
default: ok = false;
|
default: ok = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user