Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
42435e74
Commit
42435e74
authored
Apr 16, 2019
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support_kv_pair_splitter: refine fn name
parent
c43d848c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
string_splitter.h
src/butil/string_splitter.h
+3
-3
string_splitter_inl.h
src/butil/string_splitter_inl.h
+1
-1
No files found.
src/butil/string_splitter.h
View file @
42435e74
...
...
@@ -183,7 +183,7 @@ public:
:
_sp
(
str_begin
,
str_end
,
key_value_pair_delimiter
)
,
_deli_pos
(
StringPiece
::
npos
)
,
_key_value_delimiter
(
key_value_delimiter
)
{
UpdateDelimiterPos
();
UpdateDelimiterPos
ition
();
}
inline
KeyValuePairsSplitter
(
const
char
*
str_begin
,
...
...
@@ -215,7 +215,7 @@ public:
// Move splitter forward.
inline
KeyValuePairsSplitter
&
operator
++
()
{
++
_sp
;
UpdateDelimiterPos
();
UpdateDelimiterPos
ition
();
return
*
this
;
}
...
...
@@ -228,7 +228,7 @@ public:
inline
operator
const
void
*
()
const
{
return
_sp
;
}
private
:
inline
void
UpdateDelimiterPos
();
inline
void
UpdateDelimiterPos
ition
();
private
:
StringSplitter
_sp
;
...
...
src/butil/string_splitter_inl.h
View file @
42435e74
...
...
@@ -316,7 +316,7 @@ int StringMultiSplitter::to_double(double* pv) const {
return
(
endptr
==
field
()
+
length
())
?
0
:
-
1
;
}
void
KeyValuePairsSplitter
::
UpdateDelimiterPos
()
{
void
KeyValuePairsSplitter
::
UpdateDelimiterPos
ition
()
{
StringPiece
key_value_pair
(
_sp
.
field
(),
_sp
.
length
());
_deli_pos
=
key_value_pair
.
find
(
_key_value_delimiter
);
if
(
_deli_pos
==
StringPiece
::
npos
)
{
...
...
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