cpp-strings 1.0.4
Pythonic c++ strings
Loading...
Searching...
No Matches
pcs::StopSlice< IntT > Struct Template Reference

struct of slices with default stop and step values More...

#include <cppstrings.h>

Inheritance diagram for pcs::StopSlice< IntT >:
pcs::Slice< IntT >

Public Types

using MyBaseClass = Slice<IntT>

Public Member Functions

 StopSlice (const IntT stop=MyBaseClass::DEFAULT) noexcept
 < Valued constructor
virtual ~StopSlice () noexcept=default
 Default destructor.
Public Member Functions inherited from pcs::Slice< IntT >
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.

Additional Inherited Members

Static Public Attributes inherited from pcs::Slice< IntT >
static constexpr IntT DEFAULT { std::numeric_limits<IntT>::min() }

Detailed Description

template<typename IntT>
requires std::is_signed_v<IntT>
struct pcs::StopSlice< IntT >

struct of slices with default stop and step values

Class of slices with default start and step values.

Constructor & Destructor Documentation

◆ StopSlice()

template<typename IntT>
pcs::StopSlice< IntT >::StopSlice ( const IntT stop = MyBaseClass::DEFAULT)
inlinenoexcept

< Valued constructor

References pcs::Slice< IntT >::stop().

◆ ~StopSlice()

template<typename IntT>
virtual pcs::StopSlice< IntT >::~StopSlice ( )
virtualdefaultnoexcept

Default destructor.


The documentation for this struct was generated from the following file:
  • cppstrings.h