This website works better with JavaScript.
Home
Explore
Help
Sign In
Archivist
/
gplib
Watch
1
Star
1
Fork
0
Code
Issues
8
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Added a header for text handling in ascii
channel
Ludovic 'Archivist' Lagouardette
3 years ago
parent
9defdda3c5
commit
b31ad140a7
1 changed files
with
13 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+13
-0
include/gp/text/ascii.hpp
+ 13
- 0
include/gp/text/ascii.hpp
View File
@ -0,0 +1,13 @@
#
pragma once
inline
bool
is_digit
(
char
v
)
{
return
v
>
=
'
0
'
&
&
v
<
=
'
9
'
;
}
inline
bool
is_alpha
(
char
v
)
{
return
(
v
>
=
'
a
'
&
&
v
<
=
'
z
'
)
|
|
(
v
>
=
'
A
'
&
&
v
<
=
'
Z
'
)
;
}
inline
bool
is_alnum
(
char
v
)
{
return
is_alpha
(
v
)
|
|
is_digit
(
v
)
;
}
Write
Preview
Loading…
Cancel
Save