acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
_defer.h
1
#pragma once
2
3
4
5
namespace
hex
6
{
7
8
9
inline
CLASS_DECL_ACME ::i32 to(::i8 ch)
10
{
11
12
if
(ch >=
'0'
&& ch <=
'9'
)
13
{
14
15
return
ch -
'0'
;
16
17
}
18
else
if
(ch >=
'a'
&& ch <=
'f'
)
19
{
20
21
return
ch -
'a'
+ 10;
22
23
}
24
else
if
(ch >=
'A'
&& ch <=
'F'
)
25
{
26
27
return
ch -
'A'
+ 10;
28
29
}
30
else
31
{
32
33
throw
"not hexadecimal digit"
;
34
35
}
36
37
}
38
39
40
}
// namespace hex
41
42
43
prototype
string
_defer.h
Generated by
1.17.0