StrUtil.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
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 
18 #ifndef STRUTIL_H
19 #define STRUTIL_H
20 
21 #include <sstream>
22 #include <iomanip>
23 
27 std::string StringToUpper(std::string strToConvert);
28 
32 std::string StringToLower(std::string strToConvert);
33 
37 std::string NumToString(const int n);
38 
42 std::string NumToString(const unsigned int n);
43 
47 std::string NumToString(const long l);
48 
54 std::string NumToString(const float f, unsigned int width=10, unsigned int precise=7);
55 
61 std::string NumToString(const double d, unsigned int width=16, unsigned int precise=12);
62 
70 char* itoa( int value, char* result, int base ) ;
71 
78 std::string itoa(int value, int base);
79 
80 #endif
std::string StringToUpper(std::string strToConvert)
Definition: StrUtil.cpp:21
char * itoa(int value, char *result, int base)
Definition: StrUtil.cpp:70
std::string NumToString(const int n)
Definition: StrUtil.cpp:37
std::string StringToLower(std::string strToConvert)
Definition: StrUtil.cpp:29


cob_utilities
Author(s): Christian Connette
autogenerated on Wed Apr 7 2021 02:11:52