foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
pfc::stringcvt::string_utf8_from_codepage

#include <string_conv.h>

Public Member Functions

 string_utf8_from_codepage ()
 
 string_utf8_from_codepage (const string_utf8_from_codepage &p_source)
 
 string_utf8_from_codepage (unsigned p_codepage, const char *p_source, t_size p_source_size=~0)
 
void convert (unsigned p_codepage, const char *p_source, t_size p_source_size=~0)
 
const char * get_ptr () const
 
bool is_empty () const
 
t_size length () const
 
 operator const char * () const
 

Private Attributes

char_buffer_t< char > m_buffer
 

Detailed Description

Definition at line 427 of file string_conv.h.

Constructor & Destructor Documentation

pfc::stringcvt::string_utf8_from_codepage::string_utf8_from_codepage ( )
inline

Definition at line 429 of file string_conv.h.

429 {}
pfc::stringcvt::string_utf8_from_codepage::string_utf8_from_codepage ( const string_utf8_from_codepage p_source)
inline

Definition at line 430 of file string_conv.h.

430 : m_buffer(p_source.m_buffer) {}
pfc::stringcvt::string_utf8_from_codepage::string_utf8_from_codepage ( unsigned  p_codepage,
const char *  p_source,
t_size  p_source_size = ~0 
)
inline

Definition at line 431 of file string_conv.h.

431 {convert(p_codepage,p_source,p_source_size);}
void convert(unsigned p_codepage, const char *p_source, t_size p_source_size=~0)
Definition: string_conv.h:433

Member Function Documentation

void pfc::stringcvt::string_utf8_from_codepage::convert ( unsigned  p_codepage,
const char *  p_source,
t_size  p_source_size = ~0 
)
inline

Definition at line 433 of file string_conv.h.

433  {
435  temp.convert(p_codepage,p_source,p_source_size);
436  t_size size = estimate_wide_to_utf8(temp,~0);
437  m_buffer.set_size(size);
438  convert_wide_to_utf8( m_buffer.get_ptr_var(),size,temp,~0);
439  }
void convert(unsigned p_codepage, const char *p_source, t_size p_source_size=~0)
Definition: string_conv.h:364
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.
string_wide_from_codepage_t string_wide_from_codepage
Definition: string_conv.h:378
size_t t_size
Definition: int_types.h:48
void set_size(t_size p_count)
Definition: string_conv.h:83
const char* pfc::stringcvt::string_utf8_from_codepage::get_ptr ( ) const
inline

Definition at line 442 of file string_conv.h.

442 {return m_buffer.get_ptr();}
const t_char * get_ptr() const
Definition: string_conv.h:85
bool pfc::stringcvt::string_utf8_from_codepage::is_empty ( ) const
inline

Definition at line 443 of file string_conv.h.

443 {return string_is_empty_t(get_ptr());}
bool string_is_empty_t(const t_char *p_string, t_size p_string_size=~0)
Definition: string_conv.h:74
t_size pfc::stringcvt::string_utf8_from_codepage::length ( ) const
inline

Definition at line 444 of file string_conv.h.

444 {return strlen_t(get_ptr());}
t_size strlen_t(const t_char *p_string, t_size p_string_size=~0)
Definition: string_conv.h:67
pfc::stringcvt::string_utf8_from_codepage::operator const char * ( ) const
inline

Definition at line 441 of file string_conv.h.

441 {return get_ptr();}

Field Documentation

char_buffer_t<char> pfc::stringcvt::string_utf8_from_codepage::m_buffer
private

Definition at line 447 of file string_conv.h.


The documentation for this class was generated from the following file: