Functions
StrUtil.cpp File Reference
#include <cob_utilities/StrUtil.h>
#include <algorithm>
Include dependency graph for StrUtil.cpp:

Go to the source code of this file.

Functions

char * itoa (int value, char *result, int base)
std::string itoa (int value, int base)
std::string NumToString (const int n)
std::string NumToString (const unsigned int n)
std::string NumToString (const long l)
std::string NumToString (const float f, unsigned int width, unsigned int precise)
std::string NumToString (const double d, unsigned int width, unsigned int precise)
std::string StringToLower (std::string strToConvert)
std::string StringToUpper (std::string strToConvert)

Function Documentation

char* itoa ( int  value,
char *  result,
int  base 
)

C++ version char* style "itoa":

Definition at line 70 of file StrUtil.cpp.

std::string itoa ( int  value,
int  base 
)

C++ version std::string style "itoa":

Definition at line 97 of file StrUtil.cpp.

std::string NumToString ( const int  n)

convert the number to a string

Parameters:
nthe integer number to be converted

Definition at line 37 of file StrUtil.cpp.

std::string NumToString ( const unsigned int  n)

convert the number to a string

Parameters:
nthe unsigned integer number to be converted

Definition at line 43 of file StrUtil.cpp.

std::string NumToString ( const long  l)

convert the number to a string

Parameters:
lthe long integer number to be converted

Definition at line 49 of file StrUtil.cpp.

std::string NumToString ( const float  f,
unsigned int  width = 10,
unsigned int  precise = 7 
)

convert the number to a string

Parameters:
fthe float point number to be converted
widthformat of the width of the floating number, default = 10
preciseformat of the precise of the floating number, default = 7

Definition at line 55 of file StrUtil.cpp.

std::string NumToString ( const double  d,
unsigned int  width = 16,
unsigned int  precise = 12 
)

convert the number to a string

Parameters:
dthe double precise number to be converted
widthformat of the width of the number, default = 16
preciseformat of the precise of the number, default = 12

Definition at line 61 of file StrUtil.cpp.

std::string StringToLower ( std::string  strToConvert)

change the string to lower case

Parameters:
strToConvertthe string to be converted

Definition at line 29 of file StrUtil.cpp.

std::string StringToUpper ( std::string  strToConvert)

change the string to upper case

Parameters:
strToConvertthe string to be converted

Definition at line 21 of file StrUtil.cpp.



cob_utilities
Author(s): Christian Connette
autogenerated on Sat Jun 8 2019 21:02:25