ifw-core  5.0.0-pre2
Namespaces | Functions
string.cpp File Reference
#include <string.h>
#include <algorithm>
#include <boost/regex.hpp>
#include <core/utils/string/string.hpp>

Namespaces

 core
 
 core::utils
 
 core::utils::string
 

Functions

std::string core::utils::string::Upper (const std::string &str)
 Uppercase string. More...
 
std::string core::utils::string::Lower (const std::string &str)
 Lower case string. More...
 
std::string core::utils::string::Trim (const std::string &str, const std::string &trim_chars)
 Trim input string for leading/trailing characters. More...
 
std::string core::utils::string::Replace (const std::string &str, const std::string &old_sub_str, const std::string &new_sub_str)
 Replace occurences of "old_sub_str" with "new_sub_str" in "str". More...
 
std::string core::utils::string::Truncate (const std::string &text, const int32_t max_len, const std::string &truncation_indicator="...")
 Truncate "str" if longer than "max_len". More...
 
void core::utils::string::Split (const std::string &str, const std::string &separator, std::vector< std::string > &str_els, int32_t exp_nb_elements=-1)
 Split "str" according to the sequence of separator characters given. More...
 
std::vector< std::string > core::utils::string::Split (const std::string &str, const std::string &separator, int32_t exp_nb_elements=-1)
 Split "str" according to the sequence of separator characters given. More...
 
void core::utils::string::StringCopy (char *dest_buf, const char *src_buf, const int32_t max_bytes, const bool truncate=false)
 Safe string copy. If the length of “src_buf” exceeds “max_bytes” the string may either be truncated or the function fails. More...
 
void core::utils::string::SplitBuffer (const std::string buffer, std::vector< std::string > &buffer_lines, const bool strip=true, const bool remove_empty_lines=true, const std::string remove_comments="")
 Split a buffer, typically a file buffer, with newline characters. More...
 
bool core::utils::string::Match (const std::string &str, const std::string &reg_exp)
 Carry out a regular expression match on the given string. More...