class
#include <bn_istring_base.h>
istring_base Base class of bn::
It avoids circular references when including bn::
Derived classes
- class istring
- Base class of bn::
string.
Public types
- using value_type = char
- Value type alias.
- using size_type = int
- Size type alias.
- using difference_type = int
- Difference type alias.
- using reference = char&
- Reference alias.
- using const_reference = const char&
- Const reference alias.
- using pointer = char*
- Pointer alias.
- using const_pointer = const char*
- Const pointer alias.
- using iterator = char*
- Iterator alias.
- using const_iterator = const char*
- Const iterator alias.
Constructors, destructors, conversion operators
-
template<int MaxSize>istring_base(char(&char_array_ref)[MaxSize]) constexpr
- Constructor.
Public functions
-
auto size() const -> size_
type constexpr - Returns the number of characters in the istring_
base. -
auto length() const -> size_
type constexpr - Returns the number of characters in the istring_
base. -
auto max_size() const -> size_
type constexpr - Returns the maximum possible number of characters in the istring_
base. -
auto available() const -> size_
type constexpr - Returns the remaining characters capacity.
- auto empty() const -> bool constexpr
- Indicates if it doesn't contain any character.
- auto full() const -> bool constexpr
- Indicates if it can't contain any more characters.
-
auto data() const -> const_
pointer constexpr - Returns a const pointer to the beginning of the characters data.
- auto data() -> pointer constexpr
- Returns a const pointer to the beginning of the characters data.
-
auto c_str() const -> const_
pointer constexpr - Returns a const pointer to the beginning of the characters data (it is null-terminated).
-
auto begin() const -> const_
iterator constexpr - Returns a const iterator to the beginning of the characters data.
- auto begin() -> iterator constexpr
- Returns an iterator to the beginning of the characters data.
- auto end() -> iterator constexpr
- Returns a const iterator to the end of the characters data.
-
auto end() const -> const_
iterator constexpr - Returns an iterator to the end of the characters data.
-
auto cbegin() const -> const_
iterator constexpr - Returns a const iterator to the beginning of the characters data.
-
auto cend() const -> const_
iterator constexpr - Returns a const iterator to the end of the characters data.
- void clear() constexpr
- Removes all characters.
Friends
-
auto operator==(const istring_
base& a, const istring_ base& b) -> bool constexpr - Equal operator.
-
auto operator<(const istring_
base& a, const istring_ base& b) -> bool constexpr - Less than operator.
-
auto operator>(const istring_
base& a, const istring_ base& b) -> bool constexpr - Greater than operator.
-
auto operator<=(const istring_
base& a, const istring_ base& b) -> bool constexpr - Less than or equal operator.
-
auto operator>=(const istring_
base& a, const istring_ base& b) -> bool constexpr - Greater than or equal operator.
Function documentation
template<int MaxSize>
bn:: istring_base:: istring_base(char(&char_array_ref)[MaxSize]) constexpr
Constructor.
Parameters | |
---|---|
char_array_ref | Non empty const characters array. |
The characters are not copied but referenced, so they should outlive the istring_
bool operator==(const istring_ base& a,
const istring_ base& b) constexpr
Equal operator.
Parameters | |
---|---|
a | First istring_ |
b | Second istring_ |
Returns | true if the first istring_false . |
bool operator<(const istring_ base& a,
const istring_ base& b) constexpr
Less than operator.
Parameters | |
---|---|
a | First istring_ |
b | Second istring_ |
Returns | true if the first istring_false . |
bool operator>(const istring_ base& a,
const istring_ base& b) constexpr
Greater than operator.
Parameters | |
---|---|
a | First istring_ |
b | Second istring_ |
Returns | true if the first istring_false . |
bool operator<=(const istring_ base& a,
const istring_ base& b) constexpr
Less than or equal operator.
Parameters | |
---|---|
a | First istring_ |
b | Second istring_ |
Returns | true if the first istring_false . |
bool operator>=(const istring_ base& a,
const istring_ base& b) constexpr
Greater than or equal operator.
Parameters | |
---|---|
a | First istring_ |
b | Second istring_ |
Returns | true if the first istring_false . |