Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
8c10aa57
Commit
8c10aa57
authored
Aug 07, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/CharUtil: fix indent
parent
17b316b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
CharUtil.hxx
src/util/CharUtil.hxx
+16
-16
No files found.
src/util/CharUtil.hxx
View file @
8c10aa57
/*
* Copyright (C) 2011-201
3
Max Kellermann <max@duempel.org>
* Copyright (C) 2011-201
4
Max Kellermann <max@duempel.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -27,75 +27,75 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CHAR_UTIL_H
PP
#define CHAR_UTIL_H
PP
#ifndef CHAR_UTIL_H
XX
#define CHAR_UTIL_H
XX
constexpr
static
inline
bool
IsASCII
(
const
unsigned
char
ch
)
{
return
ch
<
0x80
;
return
ch
<
0x80
;
}
constexpr
static
inline
bool
IsASCII
(
const
char
ch
)
{
return
IsASCII
((
unsigned
char
)
ch
);
return
IsASCII
((
unsigned
char
)
ch
);
}
static
inline
bool
IsWhitespaceOrNull
(
const
char
ch
)
{
return
(
unsigned
char
)
ch
<=
0x20
;
return
(
unsigned
char
)
ch
<=
0x20
;
}
static
inline
bool
IsWhitespaceNotNull
(
const
char
ch
)
{
return
ch
>
0
&&
ch
<=
0x20
;
return
ch
>
0
&&
ch
<=
0x20
;
}
constexpr
static
inline
bool
IsPrintableASCII
(
char
ch
)
{
return
(
signed
char
)
ch
>=
0x20
;
return
(
signed
char
)
ch
>=
0x20
;
}
constexpr
static
inline
bool
IsDigitASCII
(
char
ch
)
{
return
ch
>=
'0'
&&
ch
<=
'9'
;
return
ch
>=
'0'
&&
ch
<=
'9'
;
}
constexpr
static
inline
bool
IsUpperAlphaASCII
(
char
ch
)
{
return
ch
>=
'A'
&&
ch
<=
'Z'
;
return
ch
>=
'A'
&&
ch
<=
'Z'
;
}
constexpr
static
inline
bool
IsLowerAlphaASCII
(
char
ch
)
{
return
ch
>=
'a'
&&
ch
<=
'z'
;
return
ch
>=
'a'
&&
ch
<=
'z'
;
}
constexpr
static
inline
bool
IsAlphaASCII
(
char
ch
)
{
return
IsUpperAlphaASCII
(
ch
)
||
IsLowerAlphaASCII
(
ch
);
return
IsUpperAlphaASCII
(
ch
)
||
IsLowerAlphaASCII
(
ch
);
}
constexpr
static
inline
bool
IsAlphaNumericASCII
(
char
ch
)
{
return
IsAlphaASCII
(
ch
)
||
IsDigitASCII
(
ch
);
return
IsAlphaASCII
(
ch
)
||
IsDigitASCII
(
ch
);
}
/**
...
...
@@ -106,9 +106,9 @@ constexpr
static
inline
char
ToUpperASCII
(
char
ch
)
{
return
ch
>=
'a'
&&
ch
<=
'z'
?
(
ch
-
(
'a'
-
'A'
))
:
ch
;
return
ch
>=
'a'
&&
ch
<=
'z'
?
(
ch
-
(
'a'
-
'A'
))
:
ch
;
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment