🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::StringViewBasic< _Char > 模板类 参考

#include <StringView.hpp>

Public 类型

typedef _Char value_type
 
typedef const _Char * pointer
 
typedef const _Char & reference
 
typedef const _Char & const_reference
 
typedef const _Char * const_iterator
 
typedef const _Char * iterator
 
typedef std::reverse_iterator< const_iterator > const_reverse_iterator
 
typedef std::reverse_iterator< iterator > reverse_iterator
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 

Public 成员函数

constexpr StringViewBasic (const _Char *str) noexcept
 
constexpr StringViewBasic (const _Char *str, size_type len) noexcept
 
template<typename _Allocator >
 StringViewBasic (const std::basic_string< _Char, std::char_traits< _Char >, _Allocator > &str) noexcept
 
constexpr StringViewBasic (const StringViewBasic &other) noexcept=default
 
StringViewBasicoperator= (const StringViewBasic &other) noexcept=default
 
constexpr size_type size () const noexcept
 
constexpr size_type length () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr const _Char & operator[] (size_type pos) const noexcept
 
constexpr const _Char & front () const noexcept
 
constexpr const _Char & back () const noexcept
 
constexpr const _Char * data () const noexcept
 
constexpr const_iterator begin () const noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr const_iterator cend () const noexcept
 
const_reverse_iterator rbegin () const noexcept
 
const_reverse_iterator rend () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator crend () const noexcept
 
void remove_prefix (size_type n) noexcept
 
void remove_suffix (size_type n) noexcept
 
void swap (StringViewBasic &other) noexcept
 
StringViewBasic substr (size_type pos=0, size_type count=npos) const
 
int compare (StringViewBasic other) const noexcept
 
bool operator== (StringViewBasic other) const noexcept
 
bool operator!= (StringViewBasic other) const noexcept
 
bool operator< (StringViewBasic other) const noexcept
 
bool operator<= (StringViewBasic other) const noexcept
 
bool operator> (StringViewBasic other) const noexcept
 
bool operator>= (StringViewBasic other) const noexcept
 
size_type find (_Char ch, size_type pos=0) const noexcept
 
size_type find (StringViewBasic str, size_type pos=0) const noexcept
 
size_type rfind (_Char ch, size_type pos=npos) const noexcept
 
size_type find_first_of (_Char ch, size_type pos=0) const noexcept
 
size_type find_first_of (StringViewBasic str, size_type pos=0) const noexcept
 
size_type find_last_of (_Char ch, size_type pos=npos) const noexcept
 
size_type find_last_of (StringViewBasic str, size_type pos=npos) const noexcept
 
bool starts_with (StringViewBasic str) const noexcept
 
bool starts_with (_Char ch) const noexcept
 
bool ends_with (StringViewBasic str) const noexcept
 
bool ends_with (_Char ch) const noexcept
 
 operator std::basic_string< _Char > () const noexcept
 

静态 Public 属性

static const size_type npos = static_cast<size_type>(-1)
 

详细描述

template<typename _Char>
class ast::StringViewBasic< _Char >

轻量级的string_view实现

模板参数
_Char字符类型,默认使用char

该类提供了对字符串的只读访问,不分配内存。


该类的文档由以下文件生成: