JustEnoughMod
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
Functions
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
h
i
j
m
o
p
q
s
t
u
v
x
y
~
Functions
_
a
d
e
f
j
m
o
p
q
s
t
u
v
~
Variables
Enumerations
Enumerator
Related Symbols
Files
File List
File Members
All
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Examples
▼
JustEnoughMod
►
Getting Started
►
FAQ
pag_example
►
JustEnoughMod
Bug List
►
Topics
►
Namespaces
►
Classes
▼
Files
▼
File List
►
doxygen-1.10.0
▼
include
►
core
►
event
►
plugin
►
render
►
sched
▼
util
Queue.hpp
Util.hpp
Version.hpp
JustEnoughMod.hpp
►
File Members
►
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
Util.hpp
1
#ifndef UTIL_UTIL_HPP
2
#define UTIL_UTIL_HPP
3
4
namespace
JEM {
5
constexpr
auto
atoi(
const
char
*ch) ->
int
{
6
int
i = 0;
7
8
while
(*ch !=
'\0'
) {
9
if
(*ch < 48 || *ch > 57) {
10
break
;
11
}
12
13
i *= 10;
14
i += *ch - 48;
15
16
++ch;
17
}
18
19
return
i;
20
}
21
22
constexpr
auto
removeAppName(
char
*path) ->
char
* {
23
char
*orig = path;
24
25
while
(*path !=
'\0'
) {
26
++path;
27
}
28
while
(*path !=
'/'
) {
29
--path;
30
}
31
++path;
32
*path =
'\0'
;
33
34
return
orig;
35
}
36
}
// namespace JEM
37
38
#endif
include
util
Util.hpp
Generated by
1.10.0