25 #include "common/scummsys.h" 26 #include "common/util.h" 27 #include "common/str-enc.h" 28 #include "common/str-base.h" 70 WARN_DEPRECATED(
"Use u32char_type_t instead of uint32")
72 WARN_DEPRECATED(
"Use u32char_type_t instead of uint32")
74 WARN_DEPRECATED(
"Use u32char_type_t instead of uint32")
78 U32String(
const value_type *beginP,
const value_type *endP) :
BaseString<u32char_type_t>(beginP, endP) {}
87 explicit U32String(
const char *str, CodePage page = kUtf8);
90 U32String(
const char *str, uint32 len, CodePage page = kUtf8);
93 U32String(
const char *beginP,
const char *endP, CodePage page = kUtf8);
148 StringEncodingResult
encode(
String &outString, CodePage page,
char errorChar)
const;
156 template<
class... TParam>
166 static int vformat(
const value_type *fmt,
const value_type *fmtEnd,
U32String &output, va_list args);
171 WARN_DEPRECATED(
"Use c_str() instead")
173 return (
const uint32 *)
_str;
204 static value_type* ustr_helper_itoa(
int num, value_type* str, uint base);
210 static value_type* ustr_helper_uitoa(uint num, value_type* str, uint base);
212 void decodeInternal(
const char *str, uint32 len, CodePage page);
213 void decodeOneByte(
const char *str, uint32 len, CodePage page);
214 void decodeWindows932(
const char *src, uint32 len);
215 void decodeWindows936(
const char *src, uint32 len);
216 void decodeWindows949(
const char *src, uint32 len);
217 void decodeWindows950(
const char *src, uint32 len);
218 void decodeJohab(
const char *src, uint32 len);
219 void decodeUTF8(
const char *str, uint32 len);
224 template<
class... TParam>
226 return formatInternal(&fmt, Common::forward<TParam>(param)...);
U32String(const value_type *str, uint32 len)
Definition: ustr.h:68
U32String(const U32String &str)
Definition: ustr.h:81
static int vformat(const value_type *fmt, const value_type *fmtEnd, U32String &output, va_list args)
static Common::U32String decodeUTF16Native(const uint16 *start, uint len)
bool operator==(const String &x) const
U32String transcodeChineseT2S() const
uint16 * encodeUTF16Native(uint *len=nullptr) const
uint32 unsigned_type
Definition: ustr.h:59
U32String & operator+=(const U32String &str)
Definition: str-base.h:32
U32String & operator=(const U32String &str)
String encode(CodePage page=kUtf8) const
uint16 * encodeUTF16BE(uint *len=nullptr) const
String toPrintable(const String &src, bool keepNewLines=true)
static U32String format(const U32String &fmt, TParam... param)
Definition: ustr.h:225
Definition: algorithm.h:29
DBCSString operator+(const DBCSString &x, const DBCSString &y)
U32String(const value_type *beginP, const value_type *endP)
Definition: ustr.h:78
U32String(U32String &&str)
Definition: ustr.h:84
char32_t u32char_type_t
Definition: ustr.h:41
uint16 * encodeUTF16LE(uint *len=nullptr) const
constexpr U32String()
Definition: ustr.h:62
constexpr U32String(value_type c)
Definition: ustr.h:99
const uint32 * u32_str() const
Definition: ustr.h:172
value_type * _str
Definition: str-base.h:60
U32String substr(size_t pos=0, size_t len=npos) const
U32String(const value_type *str)
Definition: ustr.h:65
bool operator!=(const String &x) const
static Common::U32String decodeUTF16BE(const uint16 *start, uint len)
static Common::U32String decodeUTF16LE(const uint16 *start, uint len)