Gazebo Common

API Reference

6.0.0~pre2
StringUtils.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Open Source Robotics Foundation
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 GZ_COMMON_STRINGUTILS_HH_
18#define GZ_COMMON_STRINGUTILS_HH_
19
20#include <string>
21#include <vector>
22
23#include <gz/common/Export.hh>
24
25namespace gz
26{
27 namespace common
28 {
34 const std::string &_orig, char _delim);
35
45 std::string GZ_COMMON_VISIBLE Join(
46 const std::vector<std::string> &_orig, const std::string &_delim);
47
57 std::string GZ_COMMON_VISIBLE Join(
58 const std::vector<std::string> &_orig, char _delim);
59
64 bool GZ_COMMON_VISIBLE StartsWith(const std::string &_s1,
65 const std::string &_s2);
66
71 bool GZ_COMMON_VISIBLE EndsWith(const std::string &_s1,
72 const std::string &_s2);
73
81 std::string GZ_COMMON_VISIBLE PluralCast(
82 const std::string &_baseWord, const int _n);
83
90 std::string GZ_COMMON_VISIBLE PluralCast(
91 const std::string &_singular,
92 const std::string &_plural,
93 const int _n);
94 }
95}
96
97#endif