Go to the documentation of this file.
25 #ifndef __NMV_STR_UTILS_H__
26 #define __NMV_STR_UTILS_H__
29 NEMIVER_BEGIN_NAMESPACE (
nemiver)
30 NEMIVER_BEGIN_NAMESPACE (str_utils)
35 std::
string &a_file_path,
36 std::
string &a_line_num);
52 vector<
UString>::const_iterator &a_to,
59 if (!a_string.size ()) {
return;}
61 Glib::ustring::size_type i = 0;
64 while (!a_string.empty () && isspace (a_string.at (0))) {
65 a_string.erase (0, 1);
72 while (i > 0 && isspace (a_string.at (i))) {
73 a_string.erase (i, 1);
78 if (i == 0 && isspace (a_string.at (i))) {a_string.erase (0, 1);}
92 const std::list<std::string> &supported_encodings,
96 NEMIVER_END_NAMESPACE (str_utils)
99 #endif // __NMV_STR_UTILS_H__
UString::size_type get_number_of_words(const UString &a_string)
Definition: nmv-address.h:31
UString join(vector< UString >::const_iterator &a_from, vector< UString >::const_iterator &a_to, const UString &a_delim=" ")
vector< UString > split(const UString &a_string, const UString &a_delim)
bool is_buffer_valid_utf8(const char *a_buffer, unsigned a_len)
Definition: nmv-ustring.h:45
void chomp(S &a_string)
Definition: nmv-str-utils.h:57
bool string_is_decimal_number(const string &)
bool string_is_number(const string &)
size_t hexa_to_int(const string &a_hexa_str)
UString vprintf(const UString &a_format, va_list a_args)
bool ensure_buffer_is_in_utf8(const std::string &a_input, const std::list< std::string > &supported_encodings, UString &a_output)
std::string int_to_string(size_t an_int)
UString printf(const UString &a_format,...)
bool parse_host_and_port(const std::string &a, std::string &a_host, unsigned &a_port)
UString::size_type get_number_of_lines(const UString &a_string)
bool extract_path_and_line_num_from_location(const std::string &a_location, std::string &a_file_path, std::string &a_line_num)
bool string_is_hexa_number(const string &a_str)
vector< UString > split_set(const UString &a_string, const UString &a_delim_set)
Definition: nmv-proc-list-dialog.h:32