tinyutf8 4.0.2
Unicode (UTF-8) capable std::string
Loading...
Searching...
No Matches
tinyutf8.h File Reference
#include <memory>
#include <cstring>
#include <string>
#include <limits>
#include <functional>
#include <algorithm>
#include <type_traits>
#include <cstddef>
#include <cstdint>
#include <initializer_list>
#include <iosfwd>
Include dependency graph for tinyutf8.h:

Go to the source code of this file.

Classes

struct  tiny_utf8::tiny_utf8_detail::read_codepoints_tag
 
struct  tiny_utf8::tiny_utf8_detail::read_bytes_tag
 
class  tiny_utf8::tiny_utf8_detail::is_little_endian
 Helper to detect little endian. More...
 
union  tiny_utf8::tiny_utf8_detail::last_byte< T, size_t >
 Helper to modify the last (address-wise) byte of a little endian value of type 'T'. More...
 
union  tiny_utf8::tiny_utf8_detail::last_byte< T, 1 >
 
struct  tiny_utf8::codepoint_reference< Container, RangeCheck >
 
struct  tiny_utf8::raw_codepoint_reference< Container, RangeCheck >
 
struct  tiny_utf8::iterator_base< Container, Raw >
 
struct  tiny_utf8::iterator_base< Container, true >
 
struct  tiny_utf8::iterator< Container, Raw >
 
struct  tiny_utf8::const_iterator< Container, Raw >
 
struct  tiny_utf8::reverse_iterator< Container, Raw >
 
struct  tiny_utf8::const_reverse_iterator< Container, Raw >
 
class  tiny_utf8::basic_string< ValueType, DataType, Allocator >
 
struct  tiny_utf8::basic_string< ValueType, DataType, Allocator >::NON_SSO
 Layout specifications. More...
 
struct  tiny_utf8::basic_string< ValueType, DataType, Allocator >::SSO
 
struct  std::hash< tiny_utf8::basic_string< V, D, A > >
 

Namespaces

namespace  tiny_utf8
 Want global declarations?
 
namespace  tiny_utf8::tiny_utf8_detail
 Implementation Detail.
 
namespace  std
 STL namespace.
 

Macros

#define TINY_UTF8_THROW(...)
 Determine the mode of error handling.
 
#define TINY_UTF8_CPLUSPLUS   __cplusplus
 Determine portable __cplusplus macro.
 
#define TINY_UTF8_FALLTHROUGH   /* fall through */
 Determine the way to inform about fallthrough behavior.
 
#define TINY_UTF8_CPP17(...)
 Remove Warnings, since it is wrong for all cases in this file.
 
#define TINY_UTF8_NOEXCEPT   true
 Determine noexcept specifications.
 
#define TINY_UTF8_HAS_CLZ   false
 Count leading zeros utility.
 

Typedefs

using tiny_utf8::string = basic_string<char32_t, char>
 Typedef of string (data type: char)
 
using tiny_utf8::utf8_string = basic_string<char32_t, char>
 
using tiny_utf8::u8string = utf8_string
 Typedef of u8string (data type char8_t)
 

Functions

template<typename T >
std::size_t tiny_utf8::tiny_utf8_detail::strlen (const T *str)
 strlen for different character types
 
template<>
std::size_t tiny_utf8::tiny_utf8_detail::strlen< char > (const char *str)
 
template<typename Container >
iterator< Container, true >::difference_type tiny_utf8::operator- (const iterator< Container, false > &lhs, const iterator< Container, false > &rhs) noexcept
 
template<typename Container >
reverse_iterator< Container, true >::difference_type tiny_utf8::operator- (const reverse_iterator< Container, false > &lhs, const reverse_iterator< Container, false > &rhs) noexcept
 
template<typename Container >
iterator< Container, true >::difference_type tiny_utf8::operator- (const iterator< Container, true > &lhs, const iterator< Container, true > &rhs) noexcept
 
template<typename Container >
reverse_iterator< Container, true >::difference_type tiny_utf8::operator- (const reverse_iterator< Container, true > &lhs, const reverse_iterator< Container, true > &rhs) noexcept
 
template<typename V , typename D , typename A >
std::ostream & operator<< (std::ostream &stream, const tiny_utf8::basic_string< V, D, A > &str) noexcept(TINY_UTF8_NOEXCEPT)
 Stream Operations.
 
template<typename V , typename D , typename A >
std::istream & operator>> (std::istream &stream, tiny_utf8::basic_string< V, D, A > &str) noexcept(TINY_UTF8_NOEXCEPT)
 

Macro Definition Documentation

◆ TINY_UTF8_CPLUSPLUS

#define TINY_UTF8_CPLUSPLUS   __cplusplus

Determine portable __cplusplus macro.

◆ TINY_UTF8_CPP17

#define TINY_UTF8_CPP17 ( ...)

Remove Warnings, since it is wrong for all cases in this file.

Create macro that yields its arguments, if C++17 or later is present (used for "if constexpr")

◆ TINY_UTF8_FALLTHROUGH

#define TINY_UTF8_FALLTHROUGH   /* fall through */

Determine the way to inform about fallthrough behavior.

◆ TINY_UTF8_HAS_CLZ

#define TINY_UTF8_HAS_CLZ   false

Count leading zeros utility.

◆ TINY_UTF8_NOEXCEPT

#define TINY_UTF8_NOEXCEPT   true

Determine noexcept specifications.

◆ TINY_UTF8_THROW

#define TINY_UTF8_THROW ( ...)
Value:
void()

Determine the mode of error handling.

Copyright (c) 2015-2021 Jakob Riedle (DuffsDevice) All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ operator<<()

template<typename V , typename D , typename A >
std::ostream & operator<< ( std::ostream & stream,
const tiny_utf8::basic_string< V, D, A > & str )
noexcept

Stream Operations.

◆ operator>>()

template<typename V , typename D , typename A >
std::istream & operator>> ( std::istream & stream,
tiny_utf8::basic_string< V, D, A > & str )
noexcept