mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-07-02 14:04:09 +00:00
add doc: basic_string aliases
This commit is contained in:
parent
7b0f0541e3
commit
c6a9bf338a
16 changed files with 899 additions and 15 deletions
29
source/libs/string/string.rst
Normal file
29
source/libs/string/string.rst
Normal file
|
@ -0,0 +1,29 @@
|
|||
.. _sprout-string-basic_string-string:
|
||||
###############################################################################
|
||||
string
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<std::size_t N>
|
||||
using string = sprout::basic_string<char, N>;
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/string.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
using type = string<8>;
|
||||
static_assert(std::is_same<type::value_type, char>::value, "element type of string is char.");
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
| ``sprout/string/alias.hpp``
|
||||
| Convenience header: ``sprout/string.hpp``
|
||||
|
29
source/libs/string/u16string.rst
Normal file
29
source/libs/string/u16string.rst
Normal file
|
@ -0,0 +1,29 @@
|
|||
.. _sprout-string-basic_string-u16string:
|
||||
###############################################################################
|
||||
u16string
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<std::size_t N>
|
||||
using u16string = sprout::basic_string<char16_t, N>;
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/string.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
using type = u16string<8>;
|
||||
static_assert(std::is_same<type::value_type, char16_t>::value, "element type of u16string is char16_t.");
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
| ``sprout/string/alias.hpp``
|
||||
| Convenience header: ``sprout/string.hpp``
|
||||
|
29
source/libs/string/u32string.rst
Normal file
29
source/libs/string/u32string.rst
Normal file
|
@ -0,0 +1,29 @@
|
|||
.. _sprout-string-basic_string-u32string:
|
||||
###############################################################################
|
||||
u32string
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<std::size_t N>
|
||||
using u32string = sprout::basic_string<char32_t, N>;
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/string.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
using type = u32string<8>;
|
||||
static_assert(std::is_same<type::value_type, char32_t>::value, "element type of u32string is char32_t.");
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
| ``sprout/string/alias.hpp``
|
||||
| Convenience header: ``sprout/string.hpp``
|
||||
|
29
source/libs/string/wstring.rst
Normal file
29
source/libs/string/wstring.rst
Normal file
|
@ -0,0 +1,29 @@
|
|||
.. _sprout-string-basic_string-wstring:
|
||||
###############################################################################
|
||||
wstring
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
template<std::size_t N>
|
||||
using wstring = sprout::basic_string<wchar_t, N>;
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/string.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
using type = wstring<8>;
|
||||
static_assert(std::is_same<type::value_type, wchar_t>::value, "element type of wstring is charwchar_t
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
| ``sprout/string/alias.hpp``
|
||||
| Convenience header: ``sprout/string.hpp``
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue