24static char *home_dir =
".";
56 if (
rhs_[0] ==
'"' ||
rhs_[0] ==
'\'') {
69 std::string::size_type
idx;
71 if (
idx != std::string::npos) {
82 std::string::size_type
idx;
84 if (
idx != std::string::npos) {
95 std::string::size_type
idx;
97 idx =
text_.find_first_not_of (
" \t");
98 if (
idx != std::string::npos) {
102 idx =
text_.find_last_not_of (
" \t");
103 if (
idx != std::string::npos) {
112 string::iterator
pos =
text_.begin ();
130 if ( *(
in+1) == 0 || *(
in+1) ==
'/' ) {
145 while (*
in) *
lp++ = *
in++;
174 else if (*
in ==
'{') {
190 while (
ep && *
ep) *
r++ = *
ep++;
193 else if (*
in ==
'\\' && *(
in+1)) {
An abstraction to message logging facility.
A wrapper class to provide AutoPtr with reference semantics.
int split_pair(const string &text_, char sep_, string &lhs_, string &rhs_)
Split input string into two parts separated by the separator character.
void find_and_replace_char(std::string &text_, char src_, char dest_)
Find and relpace all instances of src_ character with dest_ character in a string text_.
void trim_sides(std::string &text_)
Trim white spaces and tabs from the beginning and the end of the text string.
void split(const char *text_, std::vector< std::string > &vec_)
Split character string into tokens separated by the whitespace character (blank, tab,...
std::string strenv(const char *in_)
Expand the passed string in_ by substituting environment variable names for their values.
std::string get_cwd_name()
Get current working directory.
int ltrim(std::string &text_, const std::string &delim_)
Trim string from the beginning to the left of the delimiter.
int rtrim(std::string &text_, const std::string &delim_)
Trim string from the delimiter to the end of the string.