Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
4f52f60b
Commit
4f52f60b
authored
Sep 07, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: Inline some single character categorization functions
parent
5afc2562
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
src/util.cc
src/util.cc
+0
-10
src/util.h
src/util.h
+7
-3
No files found.
src/util.cc
View file @
4f52f60b
...
...
@@ -66,16 +66,6 @@ const char DEFAULT_STRIP_CHARSET[] = "\r\n\t ";
const
char
UPPER_XDIGITS
[]
=
"0123456789ABCDEF"
;
bool
isAlpha
(
const
char
c
)
{
return
(
'A'
<=
c
&&
c
<=
'Z'
)
||
(
'a'
<=
c
&&
c
<=
'z'
);
}
bool
isDigit
(
const
char
c
)
{
return
'0'
<=
c
&&
c
<=
'9'
;
}
bool
isHexDigit
(
const
char
c
)
{
return
isDigit
(
c
)
||
(
'A'
<=
c
&&
c
<=
'F'
)
||
(
'a'
<=
c
&&
c
<=
'f'
);
}
bool
inRFC3986UnreservedChars
(
const
char
c
)
{
static
const
char
unreserved
[]
=
{
'-'
,
'.'
,
'_'
,
'~'
};
return
isAlpha
(
c
)
||
isDigit
(
c
)
||
...
...
src/util.h
View file @
4f52f60b
...
...
@@ -158,11 +158,15 @@ std::string joinPath(InputIterator first, InputIterator last) {
return
strjoin
(
elements
.
begin
(),
elements
.
end
(),
"/"
);
}
bool
isAlpha
(
const
char
c
);
inline
bool
isAlpha
(
const
char
c
)
{
return
(
'A'
<=
c
&&
c
<=
'Z'
)
||
(
'a'
<=
c
&&
c
<=
'z'
);
}
bool
isDigit
(
const
char
c
);
inline
bool
isDigit
(
const
char
c
)
{
return
'0'
<=
c
&&
c
<=
'9'
;
}
bool
isHexDigit
(
const
char
c
);
inline
bool
isHexDigit
(
const
char
c
)
{
return
isDigit
(
c
)
||
(
'A'
<=
c
&&
c
<=
'F'
)
||
(
'a'
<=
c
&&
c
<=
'f'
);
}
bool
inRFC3986UnreservedChars
(
const
char
c
);
...
...
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