Boost.Nowide
|
A class that allows to create a temporary wide or narrow UTF strings from wide or narrow UTF source. More...
#include <boost/nowide/stackstring.hpp>
Public Types | |
typedef CharOut | output_char |
typedef CharIn | input_char |
Public Member Functions | |
basic_stackstring (const input_char *input) | |
basic_stackstring (const input_char *begin, const input_char *end) | |
basic_stackstring (const basic_stackstring &other) | |
basic_stackstring & | operator= (const basic_stackstring &other) |
output_char * | convert (const input_char *input) |
output_char * | convert (const input_char *begin, const input_char *end) |
output_char * | get () |
Return the converted, NULL-terminated string or NULL if no string was converted. | |
const output_char * | get () const |
Return the converted, NULL-terminated string or NULL if no string was converted. | |
void | clear () |
Static Public Attributes | |
static const size_t | buffer_size = BufferSize |
Protected Member Functions | |
bool | uses_stack_memory () const |
True if the stack memory is used. | |
size_t | length () const |
Friends | |
void | swap (basic_stackstring &lhs, basic_stackstring &rhs) |
A class that allows to create a temporary wide or narrow UTF strings from wide or narrow UTF source.
It uses a stack buffer if the string is short enough otherwise allocates a buffer on the heap.
Invalid UTF characters are replaced by the substitution character, see BOOST_NOWIDE_REPLACEMENT_CHARACTER
If a NULL pointer is passed to the constructor or convert method, NULL will be returned by c_str. Similarily a default constructed stackstring will return NULL on calling c_str.