Lines Matching refs:string
35 #include <string>
42 //! \brief Duplicates a C string using the new[] allocator.
50 //! \brief Joins multiple words into a string.
52 //! Joins a list of words into a string, separating them using the provided
56 std::string
57 join(const T& words, const std::string& separator)
59 std::string str;
76 //! \brief Checks if the string matches a regular expression.
78 bool match(const std::string&, const std::string&);
81 //! \brief Splits a string into words.
83 //! Splits the given string into multiple words, all separated by the
86 //! delimiter results in the original string.
88 std::vector< std::string > split(const std::string&, const std::string&);
91 //! \brief Removes whitespace from the beginning and end of a string.
93 std::string trim(const std::string&);
96 //! \brief Converts a string to a boolean value.
98 bool to_bool(const std::string&);
101 //! \brief Converts the given string to a bytes size.
103 int64_t to_bytes(std::string);
106 //! \brief Changes the case of a string to lowercase.
108 //! Returns a new string that is a lowercased version of the original
111 std::string to_lower(const std::string&);
114 //! \brief Converts the given object to a string.
116 //! Returns a string with the representation of the given object. There
120 std::string
129 //! \brief Converts the given string to another type.
131 //! Attempts to convert the given string to the requested type. Throws
136 to_type(const std::string& str)
142 throw std::runtime_error("Cannot convert string to requested type");