OpenRTM-aist  1.2.1
Namespaces | Typedefs | Functions
stringutil.h File Reference
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <cassert>
#include <errno.h>
#include <cstdlib>
#include <stdint.h>
Include dependency graph for stringutil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 coil
 Common Object Interface Layer.
 

Typedefs

typedef std::vector< std::string > coil::vstring
 
typedef std::map< std::string, std::string > coil::mapstring
 

Functions

std::wstring coil::string2wstring (std::string str)
 string to wstring conversion More...
 
std::string coil::wstring2string (std::wstring wstr)
 wstring to string conversion More...
 
void coil::toUpper (std::string &str)
 Uppercase String Transformation. More...
 
void coil::toLower (std::string &str)
 Lowercase String Transformation. More...
 
int coil::getlinePortable (std::istream &istr, std::string &line)
 Read a line from input stream. More...
 
bool coil::isEscaped (const std::string &str, std::string::size_type pos)
 Check whether the character is escaped or not. More...
 
std::string coil::escape (const std::string str)
 Escape string. More...
 
std::string coil::unescape (const std::string str)
 Unescape string. More...
 
void coil::eraseBlank (std::string &str)
 Erase blank characters of string. More...
 
void coil::eraseHeadBlank (std::string &str)
 Erase the head blank characters of string. More...
 
void coil::eraseTailBlank (std::string &str)
 Erase the tail blank characters of string. More...
 
void coil::eraseBothEndsBlank (std::string &str)
 Erase the head blank and the tail blank characters of string. More...
 
std::string coil::normalize (std::string &str)
 Erase the head/tail blank and replace upper case to lower case. More...
 
unsigned int coil::replaceString (std::string &str, const std::string from, const std::string to)
 Replace string. More...
 
vstring coil::split (const std::string &input, const std::string &delimiter, bool ignore_empty=false)
 Split string by delimiter. More...
 
bool coil::toBool (std::string str, std::string yes, std::string no, bool default_value=true)
 Convert given string into bool value. More...
 
bool coil::includes (const vstring &list, std::string value, bool ignore_case=true)
 Include if a string is included in string list. More...
 
bool coil::includes (const std::string &list, std::string value, bool ignore_case=true)
 Include if a string is included in string list. More...
 
bool coil::isAbsolutePath (const std::string &str)
 Investigate whether the given string is absolute path or not. More...
 
bool coil::isURL (const std::string &str)
 Investigate whether the given string is URL or not. More...
 
bool coil::isIPv4 (const std::string &str)
 
bool coil::isIPv6 (const std::string &str)
 
coil::mapstring coil::urlparam2map (const std::string &str)
 Investigate whether the given string is URL or not. More...
 
template<class Printable >
std::string coil::otos (Printable n)
 Convert the given object to std::string. More...
 
template<typename To >
bool coil::stringTo (To &val, const char *str)
 Convert the given std::string to object. More...
 
template<>
bool coil::stringTo< std::string > (std::string &val, const char *str)
 Convert the given string to std::string. More...
 
template<>
bool coil::stringTo< bool > (bool &val, const char *str)
 Eliminate duplication from the given string list. More...
 
template<class T >
std::string coil::ptrToHex (T *n)
 Converting a pointer to hexadecimal string. More...
 
template<class T >
bool coil::hexToPtr (T *&ptr, const std::string str)
 Converting hexadecimal string to a pointer. More...
 
vstring coil::unique_sv (vstring sv)
 Eliminate duplication from the given string list. More...
 
std::string coil::flatten (vstring sv, std::string delimiter=", ")
 Create CSV file from the given string list. More...
 
char ** coil::toArgv (const vstring &args)
 Convert the given string list into the argument list. More...
 
std::string coil::sprintf (char const *__restrict fmt,...)
 Convert it into a format given with an argumen. More...
 
std::string coil::replaceEnv (std::string str)