PrevUpHomeNext

utx::string


class utx::string

class string: virtual public std::string;

Destructor

virtual ~string() noexcept;

string cat

utx::string & cat(const R & ... r);

utx::string_literals

inline utx::string operator"" _us (const char * str, std::size_t size);

Examples

#include <utxcpp/core.hpp>
#include <iomanip>

int main() {
	utx::string str1{true};
	utx::print(std::quoted(str1));

	utx::string str2;
	str2.cat(0, 1, 2, true, false, "text");
	utx::print(str2);

	{
		using namespace utx::string_literals;
		auto str3 = "Hello"_us;
		str3 = str3.cat(" ");
		str3.cat('-');
		str3.cat("World!", 123);
		utx::print(str3);
	}
}

Output:

"true"
012truefalsetext
Hello -World!123

Last revised: June 13, 2022 at 03:08:21 GMT


PrevUpHomeNext