From 720893f67bddc1f9c17b682ae3ebdc3e62fd173a Mon Sep 17 00:00:00 2001 From: str4d Date: Mon, 9 Oct 2017 16:11:18 +0100 Subject: [PATCH] Add support to BigUint.from_str_radix() for using _ as a visual separator --- bigint/src/biguint.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/bigint/src/biguint.rs b/bigint/src/biguint.rs index f3a1c23..1c609c2 100644 --- a/bigint/src/biguint.rs +++ b/bigint/src/biguint.rs @@ -243,6 +243,7 @@ impl Num for BigUint { b'0'...b'9' => b - b'0', b'a'...b'z' => b - b'a' + 10, b'A'...b'Z' => b - b'A' + 10, + b'_' => continue, _ => u8::MAX, }; if d < radix as u8 {