File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1152,6 +1152,7 @@ let of_hex_exn (s:string) : string =
11521152 let n_of_c = function
11531153 | '0' .. '9' as c -> Char. code c - Char. code '0'
11541154 | 'a' .. 'f' as c -> 10 + Char. code c - Char. code 'a'
1155+ | 'A' .. 'F' as c -> 10 + Char. code c - Char. code 'A'
11551156 | _ -> invalid_arg " string: invalid hex"
11561157 in
11571158 if (String. length s mod 2 <> 0 ) then invalid_arg " string: hex sequence must be of even length" ;
@@ -1170,6 +1171,7 @@ let of_hex s = try Some (of_hex_exn s) with Invalid_argument _ -> None
11701171 "0068656c6c6f20776f726c64" (to_hex "\000hello world")
11711172 "" (to_hex "")
11721173 "\000hello world" (of_hex_exn "0068656c6c6f20776f726c64")
1174+ "hello world" (of_hex_exn "68656C6C6F20776F726C64")
11731175*)
11741176
11751177(* $Q
You can’t perform that action at this time.
0 commit comments