Ark Server API (ASE) - Wiki
|
#include <string.h>
Public Member Functions | |
BasicStringWriter (const Allocator &allocator=Allocator()) | |
void | move_to (std::basic_string< Char, std::char_traits< Char >, Allocator > &str) |
Public Member Functions inherited from fmt::BasicWriter< Char > | |
virtual | ~BasicWriter () |
std::size_t | size () const |
const Char * | data () const FMT_NOEXCEPT |
const Char * | c_str () const |
std::basic_string< Char > | str () const |
void | write (BasicCStringRef< Char > format, ArgList args) |
BasicWriter & | operator<< (int value) |
BasicWriter & | operator<< (unsigned value) |
BasicWriter & | operator<< (long value) |
BasicWriter & | operator<< (unsigned long value) |
BasicWriter & | operator<< (LongLong value) |
BasicWriter & | operator<< (ULongLong value) |
BasicWriter & | operator<< (double value) |
BasicWriter & | operator<< (long double value) |
BasicWriter & | operator<< (char value) |
BasicWriter & | operator<< (typename internal::WCharHelper< wchar_t, Char >::Supported value) |
BasicWriter & | operator<< (fmt::BasicStringRef< Char > value) |
BasicWriter & | operator<< (typename internal::WCharHelper< StringRef, Char >::Supported value) |
template<typename T , typename Spec , typename FillChar > | |
BasicWriter & | operator<< (IntFormatSpec< T, Spec, FillChar > spec) |
template<typename StrChar > | |
BasicWriter & | operator<< (const StrFormatSpec< StrChar > &spec) |
void | clear () FMT_NOEXCEPT |
Buffer< Char > & | buffer () FMT_NOEXCEPT |
Private Attributes | |
internal::StringBuffer< Char, Allocator > | buffer_ |
Additional Inherited Members | |
Protected Member Functions inherited from fmt::BasicWriter< Char > | |
BasicWriter (Buffer< Char > &b) | |
\rst This class template provides operations for formatting and writing data into a character stream. The output is stored in a std::basic_string
that grows dynamically.
You can use one of the following typedefs for common character types and the standard allocator:
+------------—+-------------------------—+ | Type | Definition | +===============+============================+ | StringWriter | BasicStringWriter<char> | +------------—+-------------------------—+ | WStringWriter | BasicStringWriter<wchar_t> | +------------—+-------------------------—+
Example**::
StringWriter out; out << "The answer is " << 42 << "\n";
This will write the following output to the out
object:
.. code-block:: none
The answer is 42
The output can be moved to a std::basic_string
with out.move_to()
. \endrst
|
inlineexplicit |
\rst Constructs a :class:fmt::BasicStringWriter
object. \endrst
|
inline |
|
private |