|
cpp-strings 1.0.4
Pythonic c++ strings
|
Base class for slices, with start, stop and step specified values. More...
#include <cppstrings.h>
Public Member Functions | |
| template<typename CharT = char> requires std::is_same_v<CharT, char> || std::is_same_v<CharT, char16_t> || std::is_same_v<CharT, char32_t> || std::is_same_v<CharT, wchar_t> | |
| const IntT | begin (const CppStringT< CharT > &str) noexcept |
| < starts iterating on specified CppString. | |
| const bool | end () const noexcept |
| < returns true when iterating is over, or false otherwise. | |
| const IntT | operator* () noexcept |
| < dereferences the slice. | |
| Slice | operator++ () noexcept |
| < iterates one step, pre-increment. Caution: index may be out of bounds. Check '!end()' before dereferencing the slice. | |
| Slice | operator++ (int) noexcept |
| < iterates one step, post-increment. Caution: index may be out of bounds. Check '!end()' before dereferencing the slice. | |
| Slice (const IntT start=DEFAULT, const IntT stop=DEFAULT, const IntT step=DEFAULT) noexcept | |
| < Valued constructor | |
| IntT | start () |
| Returns the start index of this slide. | |
| IntT | step () |
| Returns the step value of this slide. | |
| IntT | stop () |
| Returns the stop index of this slide. | |
| virtual | ~Slice () noexcept=default |
| Default destructor. | |
Static Public Attributes | |
| static constexpr IntT | DEFAULT { std::numeric_limits<IntT>::min() } |
Base class for slices, with start, stop and step specified values.
|
inlinenoexcept |
< Valued constructor
References start(), step(), and stop().
Referenced by operator++(), and operator++().
|
virtualdefaultnoexcept |
Default destructor.
|
inlinenoexcept |
< starts iterating on specified CppString.
|
inlinenodiscardnoexcept |
< returns true when iterating is over, or false otherwise.
|
inlinenodiscardnoexcept |
< dereferences the slice.
|
inlinenoexcept |
< iterates one step, pre-increment. Caution: index may be out of bounds. Check '!end()' before dereferencing the slice.
References Slice().
|
inlinenoexcept |
< iterates one step, post-increment. Caution: index may be out of bounds. Check '!end()' before dereferencing the slice.
References Slice().
|
inline |
Returns the start index of this slide.
Referenced by Slice(), pcs::StartSlice< IntT >::StartSlice(), pcs::StartStepSlice< IntT >::StartStepSlice(), and pcs::StartStopSlice< IntT >::StartStopSlice().
|
inline |
Returns the step value of this slide.
Referenced by Slice(), pcs::StartStepSlice< IntT >::StartStepSlice(), pcs::StepSlice< IntT >::StepSlice(), and pcs::StopStepSlice< IntT >::StopStepSlice().
|
inline |
Returns the stop index of this slide.
Referenced by Slice(), pcs::StartStopSlice< IntT >::StartStopSlice(), pcs::StopSlice< IntT >::StopSlice(), and pcs::StopStepSlice< IntT >::StopStepSlice().