Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
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
Operations
Operations
Metrics
Environments
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
cpp-libs
Actor Framework
Commits
f77c7091
Commit
f77c7091
authored
Jun 26, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generalize split to work for string_view
parent
54c167f4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
libcaf_core/caf/string_algorithms.hpp
libcaf_core/caf/string_algorithms.hpp
+3
-4
No files found.
libcaf_core/caf/string_algorithms.hpp
View file @
f77c7091
...
...
@@ -39,8 +39,8 @@ inline std::string is_any_of(std::string arg) {
constexpr
bool
token_compress_on
=
false
;
template
<
class
Container
,
class
Delim
>
void
split
(
Container
&
result
,
const
std
::
string
&
str
,
const
Delim
&
delims
,
template
<
class
Container
,
class
Str
,
class
Delim
>
void
split
(
Container
&
result
,
const
Str
&
str
,
const
Delim
&
delims
,
bool
keep_all
=
true
)
{
size_t
pos
=
0
;
size_t
prev
=
0
;
...
...
@@ -53,9 +53,8 @@ void split(Container& result, const std::string& str, const Delim& delims,
}
prev
=
pos
+
1
;
}
if
(
prev
<
str
.
size
())
{
if
(
prev
<
str
.
size
())
result
.
push_back
(
str
.
substr
(
prev
,
std
::
string
::
npos
));
}
}
template
<
class
Iterator
>
...
...
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