Classes | Namespaces | Defines | Functions
stringutil.cpp File Reference
#include <algorithm>
#include <iostream>
#include <cstring>
#include <stdio.h>
#include <stdarg.h>
#include <limits.h>
#include <coil/stringutil.h>
#include <string.h>
#include <cctype>
#include <cstdio>
Include dependency graph for stringutil.cpp:

Go to the source code of this file.


struct  coil::escape_functor
 Functor to escape string. More...
struct  coil::Toupper
 Functor to convert to capital letters. More...
struct  coil::unescape_functor
 Functor to unescape string. More...
struct  coil::unique_strvec
 Functor to find string in a list. More...


namespace  coil

Common Object Interface Layer.


#define LINE_MAX   1024


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

Define Documentation

#define LINE_MAX   1024

Author(s): Noriaki Ando
autogenerated on Sat Jun 8 2019 18:49:09