UString ustr("Hello, 世界!");
UString ustr("Hello, 世界!"); UString sub = ustr.tempSubString(7, 2); // extracts "世界"
UString ustr("Hello, 世界!"); std::string utf8 = ustr.tempUTF8String(); // converts to "Hello, \xE4\xB8\x96\xE7\x95\x8C!"These code examples demonstrate some of the basic functionalities of UString, including initialization, substring extraction, and encoding conversion. The package library for UString is ICU, which stands for International Components for Unicode. ICU is a mature, widely used C/C++ library that provides comprehensive support for Unicode and globalization. It is used in a variety of applications, from web development to software localization.