68 for(
t_size n=0;n<p_string_size;n++) {
69 if (p_string[n] == 0)
return n;
75 if (p_string_size == 0)
return true;
76 return p_string[0] == 0;
104 operator const char * ()
const {
return get_ptr();}
123 const t_size size = estimate_size(p_source, p_source_size);
132 operator const wchar_t * ()
const {
return get_ptr();}
138 const t_size base = length();
139 const t_size size = estimate_size(p_source, p_source_size);
144 const t_size base = length();
149 enum { alloc_prioritizes_speed = t_alloc<wchar_t>::alloc_prioritizes_speed };
176 operator const wchar_t * ()
const {
return get_ptr();}
199 operator const char * ()
const {
return get_ptr();}
222 operator const char * ()
const {
return get_ptr();}
245 operator const char * ()
const {
return get_ptr();}
266 operator const char * ()
const {
return get_ptr();}
277 namespace stringcvt {
364 void convert(
unsigned p_codepage,
const char * p_source,
t_size p_source_size = ~0) {
370 operator const wchar_t * ()
const {
return get_ptr();}
388 void convert(
unsigned p_codepage,
const wchar_t * p_source,
t_size p_source_size = ~0) {
394 operator const char * ()
const {
return get_ptr();}
410 void convert(
unsigned p_codepage,
const char * p_source,
t_size p_source_size = ~0) {
412 temp.
convert(p_source,p_source_size);
418 operator const char * ()
const {
return get_ptr();}
433 void convert(
unsigned p_codepage,
const char * p_source,
t_size p_source_size = ~0) {
434 string_wide_from_codepage temp;
435 temp.
convert(p_codepage,p_source,p_source_size);
441 operator const char * ()
const {
return get_ptr();}
456 operator const char * ()
const {
return get_ptr();}
472 operator const char * ()
const {
return get_ptr();}
488 operator const wchar_t * ()
const {
return get_ptr();}
504 operator const char * ()
const {
return get_ptr();}
528 convert(source,sourceLen);
538 operator const char * ()
const {
return get_ptr();}
549 namespace stringcvt {
string_ansi_from_utf8(const string_ansi_from_utf8 &p_source)
string_win1252_from_wide_t()
const char * get_ptr() const
string_wide_from_codepage_t()
string_codepage_from_utf8(const string_codepage_from_utf8 &p_source)
pfc::array_t< t_char, t_alloc > m_buffer
const t_item * get_ptr() const
char_buffer_t< wchar_t, t_alloc > m_buffer
string_codepage_from_utf8()
t_size convert_codepage_to_wide(unsigned p_codepage, wchar_t *p_out, t_size p_out_size, const char *p_source, t_size p_source_size)
Converts string from specified codepage to wide character.
t_size estimate_utf8_to_wide(const char *p_in)
void convert(const char *p_source, t_size p_source_size)
char_buffer_t< wchar_t, t_alloc > m_buffer
void convert(unsigned p_codepage, const char *p_source, t_size p_source_size=~0)
t_size estimate_wide_to_ansi(const wchar_t *p_source, t_size p_source_size)
Estimates buffer size required to convert specified wide character string to system codepage...
const char * get_ptr() const
string_utf8_from_ansi(const string_utf8_from_ansi &p_source)
void append(const char *p_source, t_size p_source_size)
char_buffer_t< char, t_alloc > m_buffer
void convert(const char *p_source, t_size p_source_size=~0)
t_size convert_wide_to_ansi(char *p_out, t_size p_out_size, const wchar_t *p_source, t_size p_source_size)
Converts string from wide character to system codepage.
const wchar_t * get_ptr() const
string_wide_from_utf8_t(const char *p_source)
virtual void add_string(const char *p_string, t_size p_length=~0)=0
void convert(const char *source, t_size sourceLen=~0)
t_size estimate_codepage_to_wide(unsigned p_codepage, const char *p_source, t_size p_source_size)
Estimates buffer size required to convert specified string from specified codepage to wide character...
const char * get_ptr() const
string_win1252_from_wide_t string_win1252_from_wide
string_utf8_from_wide_t()
char_buffer_t< char > m_buffer
string_win1252_from_utf8_t(const char *p_source, t_size p_source_size=~0)
const char * toString() const
string_utf8_from_win1252_t(const char *p_source, t_size p_source_size=~0)
const char * null_string_t< char >()
string_wide_from_win1252_t(const char *p_source, t_size p_source_size=~0)
string_wide_from_codepage_t(const string_wide_from_codepage_t< t_alloc > &p_source)
string_utf8_from_codepage(unsigned p_codepage, const char *p_source, t_size p_source_size=~0)
const char * get_ptr() const
string_wide_from_utf8_t()
string_ansi_from_wide(const wchar_t *p_source, t_size p_source_size=~0)
const char * toString() const
const t_char * get_ptr() const
string_utf8_from_codepage()
string_wide_from_utf8_t string_wide_from_utf8
string_utf8_from_win1252_t string_utf8_from_win1252
const char * get_ptr() const
bool string_is_empty_t(const t_char *p_string, t_size p_string_size=~0)
string_ansi_from_wide(const string_ansi_from_wide &p_source)
string_wide_from_utf8_t(const char *p_source, t_size p_source_size)
char_buffer_t< char, t_alloc > m_buffer
string_utf8_from_win1252 string_utf8_from_ansi
t_size estimate_size(const char *source, t_size sourceLen)
t_size convert_wide_to_utf8(char *p_out, t_size p_out_size, const wchar_t *p_in, t_size p_in_size)
Converts wide character string to UTF-8.
t_size estimate_wide_to_utf8(const wchar_t *p_in, t_size p_in_size)
Estimates buffer size required to convert specified wide character string to UTF-8.
const wchar_t * get_ptr() const
void append(const char *p_source)
void convert(unsigned p_codepage, const wchar_t *p_source, t_size p_source_size=~0)
t_size convert_utf8_to_win1252(char *p_out, t_size p_out_size, const char *p_in, t_size p_in_size)
string_codepage_from_utf8 m_buffer
t_size convert_ansi_to_wide(wchar_t *p_out, t_size p_out_size, const char *p_source, t_size p_source_size)
Converts string from system codepage to wide character.
t_size estimate_utf8_to_ascii(const char *p_source, t_size p_source_size)
string_wide_from_win1252_t()
string_codepage_from_utf8(unsigned p_codepage, const char *p_source, t_size p_source_size=~0)
const char * get_ptr() const
string_wide_from_codepage_t string_wide_from_codepage
string_utf8_from_wide string_utf8_from_os
void convert(unsigned p_codepage, const char *p_source, t_size p_source_size=~0)
t_size estimate_win1252_to_wide(const char *p_source, t_size p_source_size)
string_codepage_from_wide_t()
char_buffer_t< char, t_alloc > m_buffer
string_codepage_from_wide_t(unsigned p_codepage, const wchar_t *p_source, t_size p_source_size=~0)
string_utf8_from_ansi(const char *p_source, t_size p_source_size=~0)
void convert(const char *p_source, t_size p_source_size=~0)
string_utf8_from_wide_t string_utf8_from_wide
char_buffer_t< char, pfc::alloc_fast_aggressive > m_buffer
t_size strlen_max(const char *ptr, t_size max)
void convert(const char *p_source, t_size p_source_size=~0)
char_buffer_t< char > m_buffer
t_size convert_win1252_to_utf8(char *p_out, t_size p_out_size, const char *p_in, t_size p_in_size)
string_codepage_from_wide_t string_codepage_from_wide
t_size estimate_wide_to_win1252(const wchar_t *p_in, t_size p_in_size)
t_size convert_utf8_to_wide(wchar_t *p_out, t_size p_out_size, const char *p_in, t_size p_in_size)
Converts UTF-8 characters to wide character.
string_codepage_from_wide_t(const string_codepage_from_wide_t< t_alloc > &p_source)
string_utf8_from_win1252_t()
string_win1252_from_utf8_t string_win1252_from_utf8
t_size estimate_size(const char *source)
t_size estimate_utf8_to_wide_quick(t_size sourceLen)
estimate_utf8_to_wide_quick() functions use simple math to determine buffer size required for the con...
t_size convert_win1252_to_wide(wchar_t *p_out, t_size p_out_size, const char *p_in, t_size p_in_size)
void set_size(t_size p_size)
string_win1252_from_wide string_ansi_from_wide
t_size convert_utf8_to_wide_unchecked(wchar_t *p_out, const char *p_in)
const char * toString() const
const wchar_t * get_ptr() const
char_buffer_t< char, t_alloc > m_buffer
void convert(const char *p_source, t_size p_source_size=~0)
const char * get_ptr() const
string_codepage_from_wide m_buffer
const char * get_ptr() const
const t_char * null_string_t()
void convert(unsigned p_codepage, const char *p_source, t_size p_source_size=~0)
void convert(const wchar_t *p_source, t_size p_source_size=~0)
t_size convert_wide_to_codepage(unsigned p_codepage, char *p_out, t_size p_out_size, const wchar_t *p_source, t_size p_source_size)
Converts string from wide character to specified codepage.
const wchar_t * null_string_t< wchar_t >()
t_size convert_utf8_to_ascii(char *p_out, t_size p_out_size, const char *p_in, t_size p_in_size)
string_wide_from_utf8 string_os_from_utf8
const char * get_ptr() const
string_ascii_from_utf8(const char *p_source, t_size p_source_size=~0)
t_size estimate_utf8_to_win1252(const char *p_in, t_size p_in_size)
string_wide_from_ansi(const char *p_source, t_size p_source_size=~0)
string_win1252_from_utf8 string_ansi_from_utf8
string_wide_from_win1252 string_wide_from_ansi
string_utf8_from_os_ex(const t_source *source, t_size sourceLen=~0)
string_ansi_from_utf8(const char *p_source, t_size p_source_size=~0)
string_wide_from_codepage m_buffer
char_buffer_t(const char_buffer_t &p_source)
void convert(const char *p_source, t_size p_source_size=~0)
t_size convert_wide_to_win1252(char *p_out, t_size p_out_size, const wchar_t *p_in, t_size p_in_size)
string_utf8_from_wide_t(const wchar_t *p_source, t_size p_source_size=~0)
string_win1252_from_utf8_t()
t_size estimate_wide_to_codepage(unsigned p_codepage, const wchar_t *p_source, t_size p_source_size)
Estimates buffer size required to convert specified wide character string to specified codepage...
void convert(const wchar_t *p_source, t_size p_source_size=~0)
char_buffer_t< wchar_t, t_alloc > m_buffer
t_size estimate_win1252_to_utf8(const char *p_in, t_size p_in_size)
string_wide_from_codepage_t(unsigned p_codepage, const char *p_source, t_size p_source_size=~0)
void convert(const wchar_t *source, t_size sourceLen=~0)
string_wide_from_ansi(const string_wide_from_ansi &p_source)
t_size strlen_t(const t_char *p_string, t_size p_string_size=~0)
void set_size(t_size p_count)
t_size estimate_ansi_to_wide(const char *p_source, t_size p_source_size)
Estimates buffer size required to convert specified system codepage string to wide character...
void convert(const wchar_t *p_source, t_size p_source_size=~0)
string_utf8_from_codepage m_buffer
void convert(const char *p_source, t_size p_source_size=~0)
string_utf8_from_codepage(const string_utf8_from_codepage &p_source)
string_win1252_from_wide_t(const wchar_t *p_source, t_size p_source_size=~0)
const char * get_ptr() const
string_wide_from_win1252_t string_wide_from_win1252
pfc::string_base & operator<<(pfc::string_base &p_fmt, const wchar_t *p_str)
void convert(const char *p_source)
const char * get_ptr() const
void convert(const char *p_source, t_size p_source_size=~0)
char_buffer_t< char, t_alloc > m_buffer
string_wide_from_utf8_fast string_os_from_utf8_fast
const wchar_t * get_ptr() const
string_wide_from_utf8_t< alloc_fast_aggressive > string_wide_from_utf8_fast
const char * get_ptr() const