|
proxygen
|
A class for holding up to N characters of type Char that is amenable to constexpr string manipulation. It is guaranteed to not perform any dynamic allocation.
More...
#include <FixedString.h>
Public Types | |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
| using | reference = Char & |
| using | const_reference = const Char & |
| using | pointer = Char * |
| using | const_pointer = const Char * |
| using | iterator = Char * |
| using | const_iterator = const Char * |
| using | reverse_iterator = detail::fixedstring::ReverseIterator< Char > |
| using | const_reverse_iterator = detail::fixedstring::ReverseIterator< const Char > |
Public Member Functions | |
| constexpr | BasicFixedString () |
| constexpr | BasicFixedString (const BasicFixedString &)=default |
| template<std::size_t M> | |
| constexpr | BasicFixedString (const BasicFixedString< Char, M > &that) noexcept(M<=N) |
| template<std::size_t M> | |
| constexpr | BasicFixedString (const BasicFixedString< Char, M > &that, std::size_t pos) noexcept(false)=delete |
| template<std::size_t M> | |
| constexpr | BasicFixedString (const BasicFixedString< Char, M > &that, std::size_t pos, std::size_t count) noexcept(false) |
| template<std::size_t M> | |
| constexpr | BasicFixedString (const Char(&that)[M]) noexcept |
| constexpr | BasicFixedString (const Char *that, std::size_t count) noexcept(false) |
| constexpr | BasicFixedString (std::size_t count, Char ch) noexcept(false) |
| constexpr | BasicFixedString (std::initializer_list< Char > il) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | operator= (const BasicFixedString &) noexcept=default |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | operator= (const BasicFixedString< Char, M > &that) noexcept(M<=N) |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | operator= (const Char(&that)[M]) noexcept |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | operator= (std::initializer_list< Char > il) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR Range< Char * > | toRange () noexcept |
| constexpr Range< const Char * > | toRange () const noexcept |
| operator std::basic_string< Char > () const noexcept(false) | |
| std::basic_string< Char > | toStdString () const noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | assign (std::size_t count, Char ch) noexcept(false) |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | assign (const BasicFixedString< Char, M > &that) noexcept(M<=N) |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | assign (const BasicFixedString< Char, M > &that, std::size_t pos) noexcept(false)=delete |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | assign (const BasicFixedString< Char, M > &that, std::size_t pos, std::size_t count) noexcept(false) |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | assign (const Char(&that)[M]) noexcept |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | assign (const Char *that, std::size_t count) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR void | swap (BasicFixedString &that) noexcept |
| FOLLY_CPP14_CONSTEXPR Char * | data () noexcept |
| constexpr const Char * | data () const noexcept |
| constexpr const Char * | c_str () const noexcept |
| FOLLY_CPP14_CONSTEXPR Char * | begin () noexcept |
| constexpr const Char * | begin () const noexcept |
| constexpr const Char * | cbegin () const noexcept |
| FOLLY_CPP14_CONSTEXPR Char * | end () noexcept |
| constexpr const Char * | end () const noexcept |
| constexpr const Char * | cend () const noexcept |
| FOLLY_CPP14_CONSTEXPR reverse_iterator | rbegin () noexcept |
| constexpr const_reverse_iterator | rbegin () const noexcept |
| constexpr const_reverse_iterator | crbegin () const noexcept |
| FOLLY_CPP14_CONSTEXPR reverse_iterator | rend () noexcept |
| constexpr const_reverse_iterator | rend () const noexcept |
| constexpr const_reverse_iterator | crend () const noexcept |
| constexpr std::size_t | size () const noexcept |
| constexpr std::size_t | length () const noexcept |
| constexpr bool | empty () const noexcept |
| std::uint32_t | hash () const noexcept |
| FOLLY_CPP14_CONSTEXPR Char & | at (std::size_t i) noexcept(false) |
| constexpr const Char & | at (std::size_t i) const noexcept(false) |
| FOLLY_CPP14_CONSTEXPR Char & | operator[] (std::size_t i) noexcept |
| constexpr const Char & | operator[] (std::size_t i) const noexcept |
| FOLLY_CPP14_CONSTEXPR Char & | front () noexcept |
| constexpr const Char & | front () const noexcept |
| FOLLY_CPP14_CONSTEXPR Char & | back () noexcept |
| constexpr const Char & | back () const noexcept |
| FOLLY_CPP14_CONSTEXPR void | clear () noexcept |
| FOLLY_CPP14_CONSTEXPR void | push_back (Char ch) noexcept(false) |
| constexpr BasicFixedString< Char, N+1u > | cpush_back (Char ch) const noexcept |
| FOLLY_CPP14_CONSTEXPR void | pop_back () noexcept(false) |
| constexpr BasicFixedString< Char, N-1u > | cpop_back () const noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | append (std::size_t count, Char ch) noexcept(false) |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | append (const BasicFixedString< Char, M > &that) noexcept(false) |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | append (const BasicFixedString< Char, M > &that, std::size_t pos) noexcept(false)=delete |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | append (const BasicFixedString< Char, M > &that, std::size_t pos, std::size_t count) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | append (const Char *that) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | append (const Char *that, std::size_t count) noexcept(false) |
| constexpr BasicFixedString< Char, N+1u > | cappend (Char ch) const noexcept |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M > | cappend (const BasicFixedString< Char, M > &that) const noexcept |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M > | cappend (const BasicFixedString< Char, M > &that, std::size_t pos) const noexcept(false)=delete |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M > | cappend (const BasicFixedString< Char, M > &that, std::size_t pos, std::size_t count) const noexcept(false) |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M-1u > | cappend (const Char(&that)[M]) const noexcept |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M-1u > | cappend (const Char(&that)[M], std::size_t pos) const noexcept(false)=delete |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M-1u > | cappend (const Char(&that)[M], std::size_t pos, std::size_t count) const noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | operator+= (const Char *that) noexcept(false) |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | operator+= (const BasicFixedString< Char, M > &that) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | operator+= (Char ch) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | operator+= (std::initializer_list< Char > il) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | erase () noexcept |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | erase (std::size_t pos, std::size_t count=npos) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR Char * | erase (const Char *first) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR Char * | erase (const Char *first, const Char *last) noexcept(false) |
| constexpr BasicFixedString< Char, 0u > | cerase () const noexcept |
| constexpr BasicFixedString | cerase (std::size_t pos, std::size_t count=npos) const noexcept(false) |
| template<std::size_t M> | |
| constexpr int | compare (const BasicFixedString< Char, M > &that) const noexcept |
| template<std::size_t M> | |
| constexpr int | compare (std::size_t this_pos, std::size_t this_count, const BasicFixedString< Char, M > &that) const noexcept(false) |
| template<std::size_t M> | |
| constexpr int | compare (std::size_t this_pos, std::size_t this_count, const BasicFixedString< Char, M > &that, std::size_t that_pos, std::size_t that_count) const noexcept(false) |
| constexpr int | compare (const Char *that) const noexcept |
| constexpr int | compare (Range< const Char * > that) const noexcept |
| constexpr int | compare (std::size_t this_pos, std::size_t this_count, const Char *that) const noexcept(false) |
| constexpr int | compare (std::size_t this_pos, std::size_t this_count, Range< const Char * > that) const noexcept(false) |
| constexpr int | compare (std::size_t this_pos, std::size_t this_count, const Char *that, std::size_t that_count) const noexcept(false) |
| constexpr int | compare (std::size_t this_pos, std::size_t this_count, Range< const Char * > that, std::size_t that_count) const noexcept(false) |
| constexpr BasicFixedString | substr (std::size_t pos) const noexcept(false) |
| constexpr BasicFixedString | substr (std::size_t pos, std::size_t count) const noexcept(false) |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | replace (const Char *first, const Char *last, const BasicFixedString< Char, M > &that) noexcept(false) |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | replace (std::size_t this_pos, std::size_t this_count, const BasicFixedString< Char, M > &that, std::size_t that_pos=0u) noexcept(false) |
| template<std::size_t M> | |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | replace (std::size_t this_pos, std::size_t this_count, const BasicFixedString< Char, M > &that, std::size_t that_pos, std::size_t that_count) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | replace (std::size_t this_pos, std::size_t this_count, const Char *that) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | replace (const Char *first, const Char *last, const Char *that) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | replace (std::size_t this_pos, std::size_t this_count, const Char *that, std::size_t that_count) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | replace (std::size_t this_pos, std::size_t this_count, std::size_t that_count, Char ch) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | replace (const Char *first, const Char *last, std::size_t that_count, Char ch) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR BasicFixedString & | replace (const Char *first, const Char *last, std::initializer_list< Char > il) noexcept(false) |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M > | creplace (std::size_t this_pos, std::size_t this_count, const BasicFixedString< Char, M > &that, std::size_t that_pos=0u) const noexcept(false) |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M > | creplace (std::size_t this_pos, std::size_t this_count, const BasicFixedString< Char, M > &that, std::size_t that_pos, std::size_t that_count) const noexcept(false) |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M > | creplace (const Char *first, const Char *last, const BasicFixedString< Char, M > &that, std::size_t that_pos=0u) const noexcept(false) |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M > | creplace (const Char *first, const Char *last, const BasicFixedString< Char, M > &that, std::size_t that_pos, std::size_t that_count) const noexcept(false) |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M-1u > | creplace (std::size_t this_pos, std::size_t this_count, const Char(&that)[M]) const noexcept(false) |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M-1u > | creplace (std::size_t this_pos, std::size_t this_count, const Char(&that)[M], std::size_t that_pos, std::size_t that_count) const noexcept(false) |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M-1u > | creplace (const Char *first, const Char *last, const Char(&that)[M]) const noexcept(false) |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M-1u > | creplace (const Char *first, const Char *last, const Char(&that)[M], std::size_t that_pos, std::size_t that_count) const noexcept(false) |
| FOLLY_CPP14_CONSTEXPR std::size_t | copy (Char *dest, std::size_t count) const noexcept |
| FOLLY_CPP14_CONSTEXPR std::size_t | copy (Char *dest, std::size_t count, std::size_t pos) const noexcept(false) |
| FOLLY_CPP14_CONSTEXPR void | resize (std::size_t count) noexcept(false) |
| FOLLY_CPP14_CONSTEXPR void | resize (std::size_t count, Char ch) noexcept(false) |
| template<std::size_t M> | |
| constexpr std::size_t | find (const BasicFixedString< Char, M > &that) const noexcept |
| template<std::size_t M> | |
| constexpr std::size_t | find (const BasicFixedString< Char, M > &that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | find (const Char *that) const noexcept |
| constexpr std::size_t | find (const Char *that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | find (const Char *that, std::size_t pos, std::size_t count) const noexcept(false) |
| constexpr std::size_t | find (Char ch) const noexcept |
| constexpr std::size_t | find (Char ch, std::size_t pos) const noexcept(false) |
| template<std::size_t M> | |
| constexpr std::size_t | rfind (const BasicFixedString< Char, M > &that) const noexcept |
| template<std::size_t M> | |
| constexpr std::size_t | rfind (const BasicFixedString< Char, M > &that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | rfind (const Char *that) const noexcept |
| constexpr std::size_t | rfind (const Char *that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | rfind (const Char *that, std::size_t pos, std::size_t count) const noexcept(false) |
| constexpr std::size_t | rfind (Char ch) const noexcept |
| constexpr std::size_t | rfind (Char ch, std::size_t pos) const noexcept(false) |
| template<std::size_t M> | |
| constexpr std::size_t | find_first_of (const BasicFixedString< Char, M > &that) const noexcept |
| template<std::size_t M> | |
| constexpr std::size_t | find_first_of (const BasicFixedString< Char, M > &that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | find_first_of (const Char *that) const noexcept |
| constexpr std::size_t | find_first_of (const Char *that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | find_first_of (const Char *that, std::size_t pos, std::size_t count) const noexcept(false) |
| constexpr std::size_t | find_first_of (Char ch) const noexcept |
| constexpr std::size_t | find_first_of (Char ch, std::size_t pos) const noexcept(false) |
| template<std::size_t M> | |
| constexpr std::size_t | find_first_not_of (const BasicFixedString< Char, M > &that) const noexcept |
| template<std::size_t M> | |
| constexpr std::size_t | find_first_not_of (const BasicFixedString< Char, M > &that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | find_first_not_of (const Char *that) const noexcept |
| constexpr std::size_t | find_first_not_of (const Char *that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | find_first_not_of (const Char *that, std::size_t pos, std::size_t count) const noexcept(false) |
| constexpr std::size_t | find_first_not_of (Char ch) const noexcept |
| constexpr std::size_t | find_first_not_of (Char ch, std::size_t pos) const noexcept(false) |
| template<std::size_t M> | |
| constexpr std::size_t | find_last_of (const BasicFixedString< Char, M > &that) const noexcept |
| template<std::size_t M> | |
| constexpr std::size_t | find_last_of (const BasicFixedString< Char, M > &that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | find_last_of (const Char *that) const noexcept |
| constexpr std::size_t | find_last_of (const Char *that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | find_last_of (const Char *that, std::size_t pos, std::size_t count) const noexcept(false) |
| constexpr std::size_t | find_last_of (Char ch) const noexcept |
| constexpr std::size_t | find_last_of (Char ch, std::size_t pos) const noexcept(false) |
| template<std::size_t M> | |
| constexpr std::size_t | find_last_not_of (const BasicFixedString< Char, M > &that) const noexcept |
| template<std::size_t M> | |
| constexpr std::size_t | find_last_not_of (const BasicFixedString< Char, M > &that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | find_last_not_of (const Char *that) const noexcept |
| constexpr std::size_t | find_last_not_of (const Char *that, std::size_t pos) const noexcept(false) |
| constexpr std::size_t | find_last_not_of (const Char *that, std::size_t pos, std::size_t count) const noexcept(false) |
| constexpr std::size_t | find_last_not_of (Char ch) const noexcept |
| constexpr std::size_t | find_last_not_of (Char ch, std::size_t pos) const noexcept(false) |
Static Public Member Functions | |
| static constexpr std::size_t | capacity () noexcept |
| static constexpr std::size_t | max_size () noexcept |
Private Types | |
| using | Indices = folly::make_index_sequence< N > |
Private Member Functions | |
| template<class That , std::size_t... Is> | |
| constexpr | BasicFixedString (const That &that, std::size_t size, folly::index_sequence< Is... >, std::size_t pos=0, std::size_t count=npos) noexcept |
| template<std::size_t... Is> | |
| constexpr | BasicFixedString (std::size_t count, Char ch, folly::index_sequence< Is... >) noexcept |
| template<class Left , class Right , std::size_t... Is> | |
| constexpr | BasicFixedString (const Left &left, std::size_t left_size, const Right &right, std::size_t right_size, folly::index_sequence< Is... >) noexcept |
| template<class Left , class Right , std::size_t... Is> | |
| constexpr | BasicFixedString (const Left &left, std::size_t left_size, std::size_t left_pos, std::size_t left_count, const Right &right, std::size_t right_pos, std::size_t right_count, folly::index_sequence< Is... >) noexcept |
Private Attributes | |
| Char | data_ [N+1u] |
| std::size_t | size_ |
Friends | |
| template<class , std::size_t > | |
| class | BasicFixedString |
| struct | detail::fixedstring::Helper |
| constexpr bool | operator== (const Char *a, const BasicFixedString &b) noexcept |
| constexpr bool | operator== (const BasicFixedString &a, const Char *b) noexcept |
| constexpr bool | operator== (Range< const Char * > a, const BasicFixedString &b) noexcept |
| constexpr bool | operator== (const BasicFixedString &a, Range< const Char * > b) noexcept |
| constexpr bool | operator!= (const Char *a, const BasicFixedString &b) noexcept |
| constexpr bool | operator!= (const BasicFixedString &a, const Char *b) noexcept |
| constexpr bool | operator!= (Range< const Char * > a, const BasicFixedString &b) noexcept |
| constexpr bool | operator!= (const BasicFixedString &a, Range< const Char * > b) noexcept |
| constexpr bool | operator< (const Char *a, const BasicFixedString &b) noexcept |
| constexpr bool | operator< (const BasicFixedString &a, const Char *b) noexcept |
| constexpr bool | operator< (Range< const Char * > a, const BasicFixedString &b) noexcept |
| constexpr bool | operator< (const BasicFixedString &a, Range< const Char * > b) noexcept |
| constexpr bool | operator> (const Char *a, const BasicFixedString &b) noexcept |
| constexpr bool | operator> (const BasicFixedString &a, const Char *b) noexcept |
| constexpr bool | operator> (Range< const Char * > a, const BasicFixedString &b) noexcept |
| constexpr bool | operator> (const BasicFixedString &a, Range< const Char * > b) noexcept |
| constexpr bool | operator<= (const Char *a, const BasicFixedString &b) noexcept |
| constexpr bool | operator<= (const BasicFixedString &a, const Char *b) noexcept |
| constexpr bool | operator<= (Range< const Char * > const &a, const BasicFixedString &b) noexcept |
| constexpr bool | operator<= (const BasicFixedString &a, Range< const Char * > b) noexcept |
| constexpr bool | operator>= (const Char *a, const BasicFixedString &b) noexcept |
| constexpr bool | operator>= (const BasicFixedString &a, const Char *b) noexcept |
| constexpr bool | operator>= (Range< const Char * > a, const BasicFixedString &b) noexcept |
| constexpr bool | operator>= (const BasicFixedString &a, Range< const Char * > const &b) noexcept |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M-1u > | operator+ (const Char(&a)[M], const BasicFixedString &b) noexcept |
| template<std::size_t M> | |
| constexpr BasicFixedString< Char, N+M-1u > | operator+ (const BasicFixedString &a, const Char(&b)[M]) noexcept |
| constexpr BasicFixedString< Char, N+1u > | operator+ (Char a, const BasicFixedString &b) noexcept |
| constexpr BasicFixedString< Char, N+1u > | operator+ (const BasicFixedString &a, Char b) noexcept |
Additional Inherited Members | |
Static Private Attributes inherited from folly::detail::fixedstring::FixedStringBase_< class > | |
| static constexpr std::size_t | npos = static_cast<std::size_t>(-1) |
A class for holding up to N characters of type Char that is amenable to constexpr string manipulation. It is guaranteed to not perform any dynamic allocation.
| Char | The character type. Must be a scalar type. |
| N | The capacity and max size of string instances of this type. |
BasicFixedString is a std::string work-alike that stores characters in an internal buffer. It has minor interface differences that make it easy to work with strings in a constexpr context.
FixedString<N> is an alias for BasicFixedString<char, N>.BasicFixedString supports the full std::string interface as constexpr member functions. On a C++11 compiler, the mutating members are not constexpr, but non-mutating alternatives, which create a new string, can be used instead. For example, instead of this: folly::makeFixedString helper function, you can use a user-defined literal to make FixedString instances. The UDL feature of C++ has some limitations that make this less than ideal; you must tell the compiler roughly how many characters are in the string. The suffixes _fs4, _fs8, _fs16, _fs32, _fs64, and _fs128 exist to create instances of types FixedString<4>, FixedString<8>, etc. For example: FixedString by storing too many characters in it. _fs. This suffix always creates FixedString objects of exactly the right size. For example: BasicFixedString is set at compile time. When the user asks the string to exceed its capacity, one of three things will happen, depending on the context: assert.std::out_of_range exception. pop_back or cpop_back is called on an empty BasicFixedString.Member functions documented as having preconditions will assert in Debug mode (!defined(NDEBUG)) on precondition failures. Those documented with Throws clauses will throw the specified exception on failure. Those with both a precondition and a Throws clause will assert in Debug and throw in Release mode.
Definition at line 42 of file FixedString.h.
| using folly::BasicFixedString< Char, N >::const_iterator = const Char* |
Definition at line 599 of file FixedString.h.
| using folly::BasicFixedString< Char, N >::const_pointer = const Char* |
Definition at line 597 of file FixedString.h.
| using folly::BasicFixedString< Char, N >::const_reference = const Char& |
Definition at line 595 of file FixedString.h.
| using folly::BasicFixedString< Char, N >::const_reverse_iterator = detail::fixedstring::ReverseIterator<const Char> |
Definition at line 602 of file FixedString.h.
| using folly::BasicFixedString< Char, N >::difference_type = std::ptrdiff_t |
Definition at line 593 of file FixedString.h.
|
private |
Definition at line 531 of file FixedString.h.
| using folly::BasicFixedString< Char, N >::iterator = Char* |
Definition at line 598 of file FixedString.h.
| using folly::BasicFixedString< Char, N >::pointer = Char* |
Definition at line 596 of file FixedString.h.
| using folly::BasicFixedString< Char, N >::reference = Char& |
Definition at line 594 of file FixedString.h.
| using folly::BasicFixedString< Char, N >::reverse_iterator = detail::fixedstring::ReverseIterator<Char> |
Definition at line 600 of file FixedString.h.
| using folly::BasicFixedString< Char, N >::size_type = std::size_t |
Definition at line 592 of file FixedString.h.
|
inlineprivatenoexcept |
Definition at line 534 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), folly::constexpr_min(), count, and folly::size().
|
inlineprivatenoexcept |
Definition at line 545 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), and count.
|
inlineprivatenoexcept |
Definition at line 553 of file FixedString.h.
References testing::gmock_generated_actions_test::Char().
|
inlineprivatenoexcept |
Definition at line 570 of file FixedString.h.
References testing::gmock_generated_actions_test::Char().
|
inline |
Default construct
size() == 0 at(0) == Char(0) Definition at line 611 of file FixedString.h.
|
default |
Copy construct
size() == that.size() 0 == strncmp(data(), that.data(), size()) at(size()) == Char(0)
|
inlinenoexcept |
Construct from a differently-sized BasicFixedString
that.size() <= N size() == that.size() 0 == strncmp(data(), that.data(), size()) at(size()) == Char(0) | std::out_of_range | when that.size() > N. When M <= N, this constructor will never throw. |
M > N) are allowed as long as the size() of the source string is small enough. Definition at line 634 of file FixedString.h.
References folly::pushmi::__adl::noexcept(), and folly::BasicFixedString< Char, N >::size_.
|
deletenoexcept |
|
inlinenoexcept |
Construct from an BasicFixedString, an offset, and a count
| that | The source string |
| pos | The starting position in that |
| count | The number of characters to copy. If npos, count is taken to be that.size()-pos. |
pos <= that.size() count <= that.size()-pos && count <= N | std::out_of_range | when pos+count > that.size(), or when count > N |
Definition at line 660 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::checkOverflowOrNpos(), count, folly::BasicFixedString< Char, N >::data_, M, folly::BasicFixedString< Char, N >::size_, and type.
|
inlinenoexcept |
Construct from a string literal
M-1 <= N that[M-1] == Char(0) Definition at line 685 of file FixedString.h.
References folly::detail::fixedstring::checkNullTerminated().
|
inlinenoexcept |
Construct from a const Char* and count
that points to an array of at least count characters. count <= N | std::out_of_range | when count > N |
Definition at line 699 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), and count.
|
inlinenoexcept |
Construct an BasicFixedString that contains count characters, all of which are ch.
count <= N size() == count npos == find_first_not_of(ch) at(size()) == Char(0) | std::out_of_range | when count > N |
Definition at line 714 of file FixedString.h.
References ch, folly::detail::fixedstring::checkOverflow(), and count.
|
inlinenoexcept |
Construct an BasicFixedString from a std::initializer_list of characters.
il.size() <= N size() == count 0 == strncmp(data(), il.begin(), size()) at(size()) == Char(0) | std::out_of_range | when il.size() > N |
Definition at line 728 of file FixedString.h.
References folly::BasicFixedString< Char, N >::begin(), FOLLY_CPP14_CONSTEXPR, and folly::pushmi::__adl::noexcept().
|
inlinenoexcept |
Appends count copies of ch to this string.
count + old_size <= N old_size characters of the string are unmodified. size() == old_size + count | std::out_of_range | if count > N - size(). |
Definition at line 1240 of file FixedString.h.
References ch, testing::gmock_generated_actions_test::Char(), folly::detail::fixedstring::checkOverflow(), count, and i.
|
inlinenoexcept |
append(*this, 0, that.size()). Definition at line 1256 of file FixedString.h.
References append(), FOLLY_CPP14_CONSTEXPR, folly::pushmi::__adl::noexcept(), and folly::BasicFixedString< Char, N >::size_.
|
deletenoexcept |
|
inlinenoexcept |
Appends count characters from another string to this one, starting at a given offset, pos.
| that | The source string. |
| pos | The starting position in the source string. |
| count | The number of characters to append. If npos, count is taken to be that.size()-pos. |
pos <= that.size() count <= that.size() - pos old_size + count <= N old_size characters of the string are unmodified. size() == old_size + count at(size()) == Char(0) | std::out_of_range | if pos + count > that.size() or if old_size + count > N. |
Definition at line 1286 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::checkOverflowOrNpos(), count, folly::BasicFixedString< Char, N >::data_, i, and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
append(that, strlen(that)). Definition at line 1304 of file FixedString.h.
References append(), and folly::constexpr_strlen().
|
inlinenoexcept |
Appends count characters from the specified character array.
that points to a range of at least count characters. count + old_size <= N old_size characters of the string are unmodified. size() == old_size + count at(size()) == Char(0) | std::out_of_range | if old_size + count > N. |
Definition at line 1318 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), folly::detail::fixedstring::checkOverflow(), count, and i.
|
inlinenoexcept |
Assigns a sequence of count characters of value ch.
| count | The count of characters. |
| ch |
count <= N size() == count npos == find_first_not_of(ch) at(size()) == Char(0) | std::out_of_range | when count > N |
*this Definition at line 844 of file FixedString.h.
References ch, testing::gmock_generated_actions_test::Char(), folly::detail::fixedstring::checkOverflow(), count, and i.
Referenced by TEST().
|
inlinenoexcept |
Assigns characters from an BasicFixedString to this object.
assign(that, 0, that.size()) Definition at line 861 of file FixedString.h.
References FOLLY_CPP14_CONSTEXPR, and folly::pushmi::__adl::noexcept().
|
deletenoexcept |
|
inlinenoexcept |
Assigns count characters from an BasicFixedString to this object, starting at position pos in the source object.
| that | The source string. |
| pos | The starting position in the source string. |
| count | The number of characters to copy. If npos, count is taken to be that.size()-pos. |
pos <= that.size() count <= that.size()-pos count <= N size() == count 0 == strncmp(data(), that.begin() + pos, count) at(size()) == Char(0) | std::out_of_range | when pos > that.size() or count > that.size()-pos or count > N. |
*this Definition at line 893 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::checkOverflowOrNpos(), count, folly::BasicFixedString< Char, N >::data_, M, folly::BasicFixedString< Char, N >::size_, and type.
|
inlinenoexcept |
Assigns characters from an BasicFixedString to this object.
that contains no embedded nulls. that[M-1] == Char(0) assign(that, M - 1) Definition at line 910 of file FixedString.h.
References folly::detail::fixedstring::checkNullTerminated().
|
inlinenoexcept |
Assigns count characters from a range of characters to this object.
| that | A pointer to a range of characters. |
| count | The number of characters to copy. |
that points to at least count characters. count <= N size() == count 0 == strncmp(data(), that, count) at(size()) == Char(0) | std::out_of_range | when count > N |
*this Definition at line 927 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), folly::detail::fixedstring::checkOverflow(), count, and i.
|
inlinenoexcept |
at(size()) is allowed will return Char(0). *(data() + i) | std::out_of_range | when i > size() |
Definition at line 1105 of file FixedString.h.
References i.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1115 of file FixedString.h.
References i.
|
inlinenoexcept |
at(size()-1) !empty() Definition at line 1164 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1175 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow().
|
inlinenoexcept |
data(). Definition at line 976 of file FixedString.h.
References data_.
Referenced by folly::BasicFixedString< Char, N >::BasicFixedString(), and folly::BasicFixedString< Char, N >::compare().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 983 of file FixedString.h.
References data_.
|
inlinenoexcept |
data(). Definition at line 969 of file FixedString.h.
References data_.
Referenced by TEST().
|
inlinestaticnoexcept |
|
inlinenoexcept |
Creates a new string by appending a character to an existing string, which is left unmodified.
*this + ch Definition at line 1335 of file FixedString.h.
References ch.
|
inlinenoexcept |
Creates a new string by appending a string to an existing string, which is left unmodified.
*this + ch Definition at line 1345 of file FixedString.h.
References folly::pushmi::__adl::noexcept().
|
deletenoexcept |
|
inlinenoexcept |
Creates a new string by appending characters from one string to another, which is left unmodified.
*this + that.substr(pos, count) Definition at line 1363 of file FixedString.h.
References count.
|
inlinenoexcept |
Creates a new string by appending a string literal to a string, which is left unmodified.
*this + that Definition at line 1376 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), and folly::pushmi::__adl::noexcept().
|
deletenoexcept |
|
inlinenoexcept |
Creates a new string by appending characters from one string to another, which is left unmodified.
*this + makeFixedString(that).substr(pos, count) Definition at line 1395 of file FixedString.h.
References count.
|
inlinenoexcept |
data(). Definition at line 990 of file FixedString.h.
References folly::test::begin().
|
inlinenoexcept |
Definition at line 1011 of file FixedString.h.
References folly::test::end().
|
inlinenoexcept |
Create a new string by erasing all the characters from this string.
BasicFixedString<Char, 0>{} Definition at line 1493 of file FixedString.h.
|
inlinenoexcept |
Create a new string by erasing all the characters after position pos from this string.
creplace(pos, min(count, pos - size()), "") Definition at line 1502 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::checkOverflowOrNpos(), and count.
|
inlinenoexcept |
Clears the contents of this string.
size() == 0u at(size()) == Char(0) Definition at line 1188 of file FixedString.h.
References testing::gmock_generated_actions_test::Char().
|
inlinenoexcept |
Compare two strings for lexicographical ordering.
compare(0, size(), that.data(), that.size()) Definition at line 1518 of file FixedString.h.
References folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Compare two strings for lexicographical ordering.
compare(this_pos, this_count, that.data(), that.size()) Definition at line 1528 of file FixedString.h.
References folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Compare two strings for lexicographical ordering.
compare(this_pos, this_count, that.data() + that_pos, that_count) Definition at line 1541 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::compare_(), folly::BasicFixedString< Char, N >::data_, and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Compare two strings for lexicographical ordering.
compare(0, size(), that, strlen(that)) Definition at line 1562 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1569 of file FixedString.h.
References folly::BasicFixedString< Char, N >::begin(), and folly::BasicFixedString< Char, N >::size().
|
inlinenoexcept |
Compare two strings for lexicographical ordering.
compare(this_pos, this_count, that, strlen(that)) Definition at line 1578 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1588 of file FixedString.h.
References folly::BasicFixedString< Char, N >::begin(), and folly::BasicFixedString< Char, N >::size().
|
inlinenoexcept |
Compare two strings for lexicographical ordering.
Let A be the the character sequence {(*this)[this_pos], ... (*this)[this_pos + this_count - 1]}. Let B be the character sequence {that[0], ...that[count - 1]}. Then...
| std::out_of_range | if this_pos + this_count > size(). |
Definition at line 1610 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::checkOverflowOrNpos(), and folly::detail::fixedstring::compare_().
|
inlinenoexcept |
Definition at line 1625 of file FixedString.h.
References folly::BasicFixedString< Char, N >::begin(), folly::detail::fixedstring::checkOverflow(), and folly::BasicFixedString< Char, N >::size().
|
inlinenoexcept |
Copies min(count, size()) characters starting from offset 0 from this string into the buffer pointed to by dest.
Definition at line 2016 of file FixedString.h.
References folly::copy(), count, upload::dest, and FOLLY_CPP14_CONSTEXPR.
Referenced by folly::BasicFixedString< Char, N >::operator=().
|
inlinenoexcept |
Copies min(count, size() - pos) characters starting from offset pos from this string into the buffer pointed to by dest.
pos <= size() | std::out_of_range | if pos > size() |
Definition at line 2029 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), count, upload::dest, and i.
|
inlinenoexcept |
Returns a new string with the first size()-1 characters from this string.
!empty() BasicFixedString<Char, N-1u>{*this, 0u, size()-1u} | std::out_of_range | if empty(). |
Definition at line 1229 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow().
|
inlinenoexcept |
cappend(1u, ch). Definition at line 1205 of file FixedString.h.
References ch.
|
inlinenoexcept |
rbegin() on a const-qualified reference to *this. Definition at line 1033 of file FixedString.h.
|
inlinenoexcept |
rend() on a const-qualified reference to *this. Definition at line 1055 of file FixedString.h.
|
inlinenoexcept |
Construct a new string by replacing this_count characters starting from position this_pos within this string with the characters from string that starting at position that_pos.
that_pos <= that.size() creplace(this_pos, this_count, that, that_pos, that.size() - that_pos) Definition at line 1822 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Construct a new string by replacing this_count characters starting from position this_pos within this string with that_count characters from string that starting at position that_pos.
| this_pos | The starting offset within *this of the first character to be replaced. |
| this_count | The number of characters to be replaced. If npos, it is treated as if this_count were size() - this_pos. |
| that | A string that contains the replacement string. |
| that_pos | The offset to the first character in the replacement string. |
| that_count | The number of characters in the replacement string. |
this_pos <= size() && this_count <= size() - this_pos that_pos <= that.size() && that_count <= that.size() - that_pos size() - this_count + that_count BasicFixedString<Char, N + M>{substr(0, this_pos) + that.substr(that_pos, that_count) + substr(this_pos + this_count)} | std::out_of_range | on any of the following conditions:
|
Definition at line 1859 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::checkOverflowOrNpos(), data_, folly::BasicFixedString< Char, N >::data_, and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Construct a new string by replacing the characters denoted by the half-open range [first,last) within this string with the characters from string that starting at position that_pos.
that_pos <= that.size() creplace(first - data(), last - first, that, that_pos, that.size() - that_pos) Definition at line 1887 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Construct a new string by replacing the characters denoted by the half-open range [first,last) within this string with the that_count characters from string that starting at position that_pos.
creplace(first - data(), last - first, that, that_pos, that_count) Definition at line 1909 of file FixedString.h.
References folly::gen::first.
|
inlinenoexcept |
Construct a new string by replacing this_count characters starting from position this_pos within this string with M-1 characters from character array that.
strlen(that) == M-1 creplace(this_pos, this_count, that, 0, M - 1) Definition at line 1927 of file FixedString.h.
|
inlinenoexcept |
Replace this_count characters starting from position this_pos with that_count characters from the character array that starting at position that_pos.
| this_pos | The starting offset within *this of the first character to be replaced. |
| this_count | The number of characters to be replaced. If npos, it is treated as if this_count were size() - this_pos. |
| that | An array of characters containing the replacement string. |
| that_pos | The starting offset of the replacement string. |
| that_count | The number of characters in the replacement string. If npos, it is treated as if that_count were M - 1 - that_pos |
this_pos <= size() && this_count <= size() - this_pos that_pos <= M - 1 && that_count <= M - 1 - that_pos size() - this_count + that_count BasicFixedString<Char, N + M - 1>{ substr(0, this_pos) + makeFixedString(that).substr(that_pos, that_count) + substr(this_pos + this_count)} | std::out_of_range | on any of the following conditions: |
Definition at line 1960 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), folly::detail::fixedstring::checkNullTerminated(), folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::checkOverflowOrNpos(), and data_.
|
inlinenoexcept |
Construct a new string by replacing the characters denoted by the half-open range [first,last) within this string with the first M-1 characters from the character array that.
strlen(that) == M-1 creplace(first - data(), last - first, that, 0, M-1) Definition at line 1987 of file FixedString.h.
|
inlinenoexcept |
Construct a new string by replacing the characters denoted by the half-open range [first,last) within this string with the that_count characters from the character array that starting at position that_pos.
strlen(that) == M-1 creplace(first - data(), last - first, that, that_pos, that_count) Definition at line 2002 of file FixedString.h.
|
inlinenoexcept |
Return a pointer to a range of size()+1 characters, the last of which is Char(0).
Definition at line 955 of file FixedString.h.
References data_.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 962 of file FixedString.h.
References data_.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1004 of file FixedString.h.
|
inlinenoexcept |
Erase all characters from this string.
clear() Definition at line 1442 of file FixedString.h.
|
inlinenoexcept |
Erases count characters from position pos. If count is npos, erases from pos to the end of the string.
size() == old_size - min(count, old_size - pos) at(size()) == Char(0) | std::out_of_range | when pos > size(). |
Definition at line 1457 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::checkOverflowOrNpos(), count, and replace().
|
inlinenoexcept |
erase(first - data(), 1) Definition at line 1473 of file FixedString.h.
References data_, and folly::gen::first.
|
inlinenoexcept |
erase(first - data(), last - first) Definition at line 1482 of file FixedString.h.
References data_, and folly::gen::first.
|
inlinenoexcept |
Finds the first occurrence of the character sequence that in this string.
find(that.data(), 0, that.size()) Definition at line 2073 of file FixedString.h.
|
inlinenoexcept |
Finds the first occurrence of the character sequence that in this string, starting at offset pos.
pos <= size() find(that.data(), pos, that.size()) Definition at line 2085 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::BasicFixedString< Char, N >::data_, folly::detail::fixedstring::find_(), folly::detail::fixedstring::FixedStringBase_< class >::npos, and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Finds the first occurrence of the character sequence that in this string.
find(that.data(), 0, strlen(that)) Definition at line 2097 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
Finds the first occurrence of the character sequence that in this string, starting at offset pos.
pos <= size() find(that.data(), pos, strlen(that)) Definition at line 2107 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
Finds the first occurrence of the first count characters in the buffer pointed to by that in this string, starting at offset pos.
pos <= size() that points to a buffer containing at least count contiguous characters. i such that i >= pos and 0 == strncmp(data() + i, that, count); or npos if there is no such offset i. | std::out_of_range | when pos > size() |
Definition at line 2123 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), count, folly::detail::fixedstring::find_(), and folly::detail::fixedstring::FixedStringBase_< class >::npos.
|
inlinenoexcept |
Finds the first occurrence of the character ch in this string.
find(&ch, 0, 1) Definition at line 2136 of file FixedString.h.
References ch.
|
inlinenoexcept |
Finds the first occurrence of the character character c in this string, starting at offset pos.
pos <= size() find(&ch, pos, 1) Definition at line 2146 of file FixedString.h.
References ch, folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::find_(), and folly::detail::fixedstring::FixedStringBase_< class >::npos.
|
inlinenoexcept |
Finds the first occurrence of any character not in that in this string.
find_first_not_of(that.data(), 0, that.size()) Definition at line 2347 of file FixedString.h.
|
inlinenoexcept |
Finds the first occurrence of any character not in that in this string.
find_first_not_of(that.data(), 0, that.size()) Definition at line 2357 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::BasicFixedString< Char, N >::data_, folly::detail::fixedstring::find_first_not_of_(), folly::detail::fixedstring::FixedStringBase_< class >::npos, and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Finds the first occurrence of any character not in the null-terminated character sequence pointed to by that in this string.
find_first_not_of(that, 0, strlen(that)) Definition at line 2371 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
Finds the first occurrence of any character not in the null-terminated character sequence pointed to by that in this string, starting at offset pos
find_first_not_of(that, pos, strlen(that)) Definition at line 2381 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
Finds the first occurrence of any character not in the first count characters in the buffer pointed to by that in this string, starting at offset pos.
pos <= size() that points to a buffer containing at least count contiguous characters. i such that i >= pos and std::find(that, that+count, at(i)) == that+count; or npos if there is no such offset i. | std::out_of_range | when pos > size() |
Definition at line 2398 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), count, folly::detail::fixedstring::find_first_not_of_(), and folly::detail::fixedstring::FixedStringBase_< class >::npos.
|
inlinenoexcept |
Finds the first occurrence of any character other than ch in this string.
find_first_not_of(&ch, 0, 1) Definition at line 2412 of file FixedString.h.
References ch.
|
inlinenoexcept |
Finds the first occurrence of any character other than ch in this string, starting at offset pos.
find_first_not_of(&ch, pos, 1) Definition at line 2421 of file FixedString.h.
References ch, folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::find_first_not_of_(), and folly::detail::fixedstring::FixedStringBase_< class >::npos.
|
inlinenoexcept |
Finds the first occurrence of any character in that in this string.
find_first_of(that.data(), 0, that.size()) Definition at line 2260 of file FixedString.h.
|
inlinenoexcept |
Finds the first occurrence of any character in that in this string, starting at offset pos
find_first_of(that.data(), pos, that.size()) Definition at line 2271 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::BasicFixedString< Char, N >::data_, folly::detail::fixedstring::find_first_of_(), folly::detail::fixedstring::FixedStringBase_< class >::npos, and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Finds the first occurrence of any character in the null-terminated character sequence pointed to by that in this string.
find_first_of(that, 0, strlen(that)) Definition at line 2285 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
Finds the first occurrence of any character in the null-terminated character sequence pointed to by that in this string, starting at offset pos
find_first_of(that, pos, strlen(that)) Definition at line 2295 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
Finds the first occurrence of any character in the first count characters in the buffer pointed to by that in this string, starting at offset pos.
pos <= size() that points to a buffer containing at least count contiguous characters. i such that i >= pos and std::find(that, that+count, at(i)) != that+count; or npos if there is no such offset i. | std::out_of_range | when pos > size() |
Definition at line 2312 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), count, folly::detail::fixedstring::find_first_of_(), and folly::detail::fixedstring::FixedStringBase_< class >::npos.
|
inlinenoexcept |
Finds the first occurrence of ch in this string.
find_first_of(&ch, 0, 1) Definition at line 2325 of file FixedString.h.
References ch.
|
inlinenoexcept |
Finds the first occurrence of ch in this string, starting at offset pos.
find_first_of(&ch, pos, 1) Definition at line 2334 of file FixedString.h.
References ch, folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::find_first_of_(), and folly::detail::fixedstring::FixedStringBase_< class >::npos.
|
inlinenoexcept |
Finds the last occurrence of any character not in that in this string.
find_last_not_of(that.data(), size(), that.size()) Definition at line 2535 of file FixedString.h.
|
inlinenoexcept |
Finds the last occurrence of any character not in that in this string, starting at offset pos
find_last_not_of(that.data(), pos, that.size()) Definition at line 2546 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::constexpr_min(), folly::BasicFixedString< Char, N >::data_, folly::detail::fixedstring::find_last_not_of_(), folly::detail::fixedstring::FixedStringBase_< class >::npos, and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Finds the last occurrence of any character not in the null-terminated character sequence pointed to by that in this string.
find_last_not_of(that, size(), strlen(that)) Definition at line 2564 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
Finds the last occurrence of any character not in the null-terminated character sequence pointed to by that in this string, starting at offset pos
find_last_not_of(that, pos, strlen(that)) Definition at line 2574 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
Finds the last occurrence of any character not in the first count characters in the buffer pointed to by that in this string, starting at offset pos.
pos <= size() that points to a buffer containing at least count contiguous characters. i such that i <= pos and i < size() and std::find(that, that+count, at(i)) == that+count; or npos if there is no such offset i. | std::out_of_range | when pos > size() |
Definition at line 2591 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::constexpr_min(), count, folly::detail::fixedstring::find_last_not_of_(), and folly::detail::fixedstring::FixedStringBase_< class >::npos.
|
inlinenoexcept |
Finds the last occurrence of any character other than ch in this string.
find_last_not_of(&ch, size(), 1) Definition at line 2609 of file FixedString.h.
References ch.
|
inlinenoexcept |
Finds the last occurrence of any character other than ch in this string, starting at offset pos.
find_last_not_of(&ch, pos, 1) Definition at line 2618 of file FixedString.h.
References ch, folly::detail::fixedstring::checkOverflow(), folly::constexpr_min(), folly::detail::fixedstring::find_last_not_of_(), and folly::detail::fixedstring::FixedStringBase_< class >::npos.
|
inlinenoexcept |
Finds the last occurrence of any character in that in this string.
find_last_of(that.data(), size(), that.size()) Definition at line 2434 of file FixedString.h.
|
inlinenoexcept |
Finds the last occurrence of any character in that in this string, starting at offset pos
find_last_of(that.data(), pos, that.size()) Definition at line 2445 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::constexpr_min(), folly::BasicFixedString< Char, N >::data_, folly::detail::fixedstring::find_last_of_(), folly::detail::fixedstring::FixedStringBase_< class >::npos, and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Finds the last occurrence of any character in the null-terminated character sequence pointed to by that in this string.
find_last_of(that, size(), strlen(that)) Definition at line 2463 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
Finds the last occurrence of any character in the null-terminated character sequence pointed to by that in this string, starting at offset pos
find_last_of(that, pos, strlen(that)) Definition at line 2473 of file FixedString.h.
References folly::constexpr_strlen().
|
inlinenoexcept |
Finds the last occurrence of any character in the first count characters in the buffer pointed to by that in this string, starting at offset pos.
pos <= size() that points to a buffer containing at least count contiguous characters. i such that i <= pos and i < size() and std::find(that, that+count, at(i)) != that+count; or npos if there is no such offset i. | std::out_of_range | when pos > size() |
Definition at line 2490 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::constexpr_min(), count, folly::detail::fixedstring::find_last_of_(), and folly::detail::fixedstring::FixedStringBase_< class >::npos.
|
inlinenoexcept |
Finds the last occurrence of ch in this string.
find_last_of(&ch, size(), 1) Definition at line 2508 of file FixedString.h.
References ch.
|
inlinenoexcept |
Finds the last occurrence of ch in this string, starting at offset pos.
find_last_of(&ch, pos, 1) Definition at line 2517 of file FixedString.h.
References ch, folly::detail::fixedstring::checkOverflow(), folly::constexpr_min(), folly::detail::fixedstring::find_last_of_(), and folly::detail::fixedstring::FixedStringBase_< class >::npos.
|
inlinenoexcept |
(*this)[0] Definition at line 1149 of file FixedString.h.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1156 of file FixedString.h.
|
inlinenoexcept |
Definition at line 1096 of file FixedString.h.
References folly::hsieh_hash32_buf().
|
inlinenoexcept |
|
inlinestaticnoexcept |
|
inlinenoexcept |
Conversion to std::basic_string<Char>
Definition at line 811 of file FixedString.h.
References folly::test::begin(), and folly::test::end().
|
inlinenoexcept |
Appends characters from a null-terminated string literal to this string.
append(that). Definition at line 1404 of file FixedString.h.
References append().
|
inlinenoexcept |
Appends characters from another string to this one.
append(that). Definition at line 1414 of file FixedString.h.
References append(), and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Appends a character to this string.
push_back(ch). Definition at line 1423 of file FixedString.h.
References ch, and push_back().
|
inlinenoexcept |
Appends characters from an initializer_list to this string.
append(il.begin(), il.size()). Definition at line 1432 of file FixedString.h.
References append().
|
defaultnoexcept |
|
inlinenoexcept |
Assign from a BasicFixedString<Char, M>.
that.size() <= N size() == that.size() 0 == strncmp(data(), that.begin(), size()) at(size()) == Char(0) | std::out_of_range | when that.size() > N. When M <= N, this assignment operator will never throw. |
M > N) are allowed as long as the size of the source string is small enough. *this Definition at line 748 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), folly::detail::fixedstring::checkOverflow(), folly::BasicFixedString< Char, N >::copy(), M, folly::BasicFixedString< Char, N >::size_, and type.
|
inlinenoexcept |
Assign from a null-terminated array of characters.
M < N that has no embedded null characters that[M-1]==Char(0) *this Definition at line 767 of file FixedString.h.
References folly::detail::fixedstring::checkNullTerminated().
|
inlinenoexcept |
Assign from an initializer_list of characters.
il.size() <= N size() == il.size() 0 == strncmp(data(), il.begin(), size()) at(size()) == Char(0) | std::out_of_range | when il.size() > N |
*this Definition at line 781 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), folly::detail::fixedstring::checkOverflow(), and i.
|
inlinenoexcept |
i <= size() (*this)[size()] is allowed will return Char(0). *(data() + i) Definition at line 1127 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), and i.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1138 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), and i.
|
inlinenoexcept |
Removes the last character from the string.
!empty() size() is one fewer than before calling pop_back(). at(size()) == Char(0) [0,size()-1) are unmodified. | std::out_of_range | if empty(). |
Definition at line 1217 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), and folly::detail::fixedstring::checkOverflow().
|
inlinenoexcept |
append(1u, ch). Definition at line 1196 of file FixedString.h.
References ch, testing::gmock_generated_actions_test::Char(), and folly::detail::fixedstring::checkOverflow().
|
inlinenoexcept |
Returns a reverse iterator to the first character of the reversed string. It corresponds to the last + 1 character of the non-reversed string.
Definition at line 1019 of file FixedString.h.
Referenced by TEST().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1026 of file FixedString.h.
|
inlinenoexcept |
Returns a reverse iterator to the last + 1 character of the reversed string. It corresponds to the first character of the non-reversed string.
Definition at line 1041 of file FixedString.h.
Referenced by TEST().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1048 of file FixedString.h.
|
inlinenoexcept |
Replace the characters in the range denoted by the half-open range [first, last) with the string that.
first and last point to characters within this string (including the terminating null). replace(first - data(), last - first, that.data(), that.size()) Definition at line 1663 of file FixedString.h.
References folly::gen::first, replace(), and folly::BasicFixedString< Char, N >::size_.
Referenced by TEST().
|
inlinenoexcept |
Replace this_count characters starting from position this_pos with the characters from string that starting at position that_pos.
that_pos <= that.size() replace(this_pos, this_count, that.data() + that_pos, that.size() - that_pos) Definition at line 1679 of file FixedString.h.
References replace(), and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Replace this_count characters starting from position this_pos with that_count characters from string that starting at position that_pos.
that_pos <= that.size() && that_count <= that.size() - that_pos replace(this_pos, this_count, that.data() + that_pos, that_count) Definition at line 1696 of file FixedString.h.
|
inlinenoexcept |
Replace this_count characters starting from position this_pos with the characters from the string literal that.
replace(this_pos, this_count, that, strlen(that)) Definition at line 1711 of file FixedString.h.
References folly::constexpr_strlen(), and replace().
|
inlinenoexcept |
Replace the characters denoted by the half-open range [first,last) with the characters from the string literal that.
first and last point to characters within this string (including the terminating null). replace(first - data(), last - first, that, strlen(that)) Definition at line 1726 of file FixedString.h.
References folly::constexpr_strlen(), folly::gen::first, and replace().
|
inlinenoexcept |
Replace this_count characters starting from position this_pos with that_count characters from the character sequence pointed to by that.
| this_pos | The starting offset within *this of the first character to be replaced. |
| this_count | The number of characters to be replaced. If npos, it is treated as if this_count were size() - this_pos. |
| that | A pointer to the replacement string. |
| that_count | The number of characters in the replacement string. |
this_pos <= size() && this_count <= size() - this_pos that points to a contiguous sequence of at least that_count characters | std::out_of_range | on any of the following conditions: |
Definition at line 1751 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::detail::fixedstring::checkOverflowOrNpos(), and data_.
|
inlinenoexcept |
Replace this_count characters starting from position this_pos with that_count characters ch.
replace(this_pos, this_count, BasicFixedString{that_count, ch}) Definition at line 1774 of file FixedString.h.
|
inlinenoexcept |
Replace the characters denoted by the half-open range [first,last) with that_count characters ch.
replace(first - data(), last - first, BasicFixedString{that_count, ch}) Definition at line 1788 of file FixedString.h.
References ch, folly::gen::first, and replace().
|
inlinenoexcept |
Replace the characters denoted by the half-open range [first,last) with the characters from the string literal that.
first and last point to characters within this string (including the terminating null). replace(this_pos, this_count, il.begin(), il.size()) Definition at line 1805 of file FixedString.h.
References folly::gen::first, and replace().
|
inlinenoexcept |
Resizes the current string.
resize(count, Char(0)) Definition at line 2044 of file FixedString.h.
References testing::gmock_generated_actions_test::Char(), count, and resize().
|
inlinenoexcept |
Resizes the current string by setting the size to count and setting data()[count] to Char(0). If count > old_size, the characters in the range [old_size,count) are set to ch.
Definition at line 2053 of file FixedString.h.
References ch, testing::gmock_generated_actions_test::Char(), folly::detail::fixedstring::checkOverflow(), and count.
|
inlinenoexcept |
Finds the last occurrence of characters in the string that in this string.
rfind(that.data(), size(), that.size()) Definition at line 2159 of file FixedString.h.
References folly::rfind().
|
inlinenoexcept |
Finds the last occurrence of characters in the string that in this string, starting at offset pos.
rfind(that.data(), pos, that.size()) Definition at line 2170 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::constexpr_min(), folly::BasicFixedString< Char, N >::data_, folly::detail::fixedstring::FixedStringBase_< class >::npos, folly::detail::fixedstring::rfind_(), and folly::BasicFixedString< Char, N >::size_.
|
inlinenoexcept |
Finds the last occurrence of characters in the buffer pointed to by that in this string.
rfind(that, size(), strlen(that)) Definition at line 2189 of file FixedString.h.
References folly::constexpr_strlen(), and folly::rfind().
|
inlinenoexcept |
Finds the last occurrence of characters in the buffer pointed to by that in this string, starting at offset pos.
rfind(that, pos, strlen(that)) Definition at line 2198 of file FixedString.h.
References folly::constexpr_strlen(), and folly::rfind().
|
inlinenoexcept |
Finds the last occurrence of the first count characters in the buffer pointed to by that in this string, starting at offset pos.
pos <= size() that points to a buffer containing at least count contiguous characters. i such that i <= pos and i + count <= size() and 0 == strncmp(data() + i, that, count); or npos if there is no such offset i. | std::out_of_range | when pos > size() |
Definition at line 2214 of file FixedString.h.
References folly::detail::fixedstring::checkOverflow(), folly::constexpr_min(), count, folly::detail::fixedstring::FixedStringBase_< class >::npos, and folly::detail::fixedstring::rfind_().
|
inlinenoexcept |
Finds the last occurrence of the character character ch in this string.
rfind(&ch, size(), 1) Definition at line 2233 of file FixedString.h.
References ch, and folly::rfind().
|
inlinenoexcept |
Finds the last occurrence of the character character ch in this string, starting at offset pos.
pos <= size() rfind(&ch, pos, 1) Definition at line 2243 of file FixedString.h.
References ch, folly::detail::fixedstring::checkOverflow(), folly::constexpr_min(), folly::detail::fixedstring::FixedStringBase_< class >::npos, and folly::detail::fixedstring::rfind_().
|
inlinenoexcept |
Char elements in the string. Definition at line 1062 of file FixedString.h.
Referenced by folly::BasicFixedString< Char, N >::compare().
|
inlinenoexcept |
Return a substring from pos to the end of the string.
BasicFixedString{*this, pos} Definition at line 1641 of file FixedString.h.
|
inlinenoexcept |
Return a substring from pos to the end of the string.
BasicFixedString{*this, pos, count} Definition at line 1649 of file FixedString.h.
References count.
|
inlinenoexcept |
Swap the contents of this string with that.
Definition at line 942 of file FixedString.h.
References folly::constexpr_max(), folly::detail::fixedstring::constexpr_swap(), folly::BasicFixedString< Char, N >::data_, i, and folly::BasicFixedString< Char, N >::size_.
Referenced by TEST().
|
inlinenoexcept |
Conversion to folly::Range
Definition at line 796 of file FixedString.h.
References folly::test::begin(), and folly::test::end().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 803 of file FixedString.h.
References folly::test::begin(), and folly::test::end().
|
inlinenoexcept |
Definition at line 815 of file FixedString.h.
References folly::test::begin(), and folly::test::end().
|
friend |
Definition at line 516 of file FixedString.h.
|
friend |
Definition at line 517 of file FixedString.h.
|
friend |
Definition at line 2668 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2677 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2686 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2695 of file FixedString.h.
|
friend |
Asymmetric concatenation
Definition at line 2845 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2860 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2874 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2889 of file FixedString.h.
|
friend |
Definition at line 2701 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2712 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2723 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2734 of file FixedString.h.
|
friend |
Definition at line 2775 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2784 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2793 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2802 of file FixedString.h.
|
friend |
Asymmetric relational operators
Definition at line 2634 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2644 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2653 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2662 of file FixedString.h.
|
friend |
Definition at line 2742 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2751 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2760 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2769 of file FixedString.h.
|
friend |
Definition at line 2808 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2817 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2826 of file FixedString.h.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2835 of file FixedString.h.
|
private |
Definition at line 528 of file FixedString.h.
Referenced by folly::BasicFixedString< Char, N >::append(), folly::BasicFixedString< Char, N >::assign(), folly::BasicFixedString< Char, N >::BasicFixedString(), folly::BasicFixedString< Char, N >::compare(), folly::BasicFixedString< Char, N >::creplace(), folly::BasicFixedString< Char, N >::find(), folly::BasicFixedString< Char, N >::find_first_not_of(), folly::BasicFixedString< Char, N >::find_first_of(), folly::BasicFixedString< Char, N >::find_last_not_of(), folly::BasicFixedString< Char, N >::find_last_of(), folly::BasicFixedString< Char, N >::rfind(), and folly::BasicFixedString< Char, N >::swap().
|
private |
Definition at line 529 of file FixedString.h.
Referenced by folly::BasicFixedString< Char, N >::append(), folly::BasicFixedString< Char, N >::assign(), folly::BasicFixedString< Char, N >::BasicFixedString(), folly::BasicFixedString< Char, N >::compare(), folly::BasicFixedString< Char, N >::creplace(), folly::BasicFixedString< Char, N >::find(), folly::BasicFixedString< Char, N >::find_first_not_of(), folly::BasicFixedString< Char, N >::find_first_of(), folly::BasicFixedString< Char, N >::find_last_not_of(), folly::BasicFixedString< Char, N >::find_last_of(), folly::BasicFixedString< Char, N >::operator+=(), folly::BasicFixedString< Char, N >::operator=(), folly::BasicFixedString< Char, N >::replace(), folly::BasicFixedString< Char, N >::rfind(), and folly::BasicFixedString< Char, N >::swap().