include
urg_stamped
strings.h
Go to the documentation of this file.
1
/*
2
* Copyright 2024 The urg_stamped Authors
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#ifndef URG_STAMPED_STRINGS_H
18
#define URG_STAMPED_STRINGS_H
19
20
#include <sstream>
21
#include <string>
22
#include <vector>
23
24
namespace
urg_stamped
25
{
26
namespace
strings
27
{
28
inline
std::vector<std::string>
split
(
const
std::string& s,
const
char
delim)
29
{
30
std::vector<std::string> out;
31
std::stringstream stream(
s
);
32
std::string el;
33
while
(std::getline(stream, el, delim))
34
{
35
out.push_back(el);
36
}
37
return
out;
38
}
39
};
// namespace strings
40
};
// namespace urg_stamped
41
42
#endif // URG_STAMPED_STRINGS_H
43
urg_stamped::strings::split
std::vector< std::string > split(const std::string &s, const char delim)
Definition:
strings.h:28
s
XmlRpcServer s
urg_stamped
Definition:
device_state_estimator.h:35
urg_stamped
Author(s): Atsushi Watanabe
autogenerated on Wed Dec 18 2024 03:10:57