Base Framework
Public Member Functions | List of all members
RegExp::Substring Class Reference

Substring descriptor. More...

#include <base/string/RegExp.h>

Inherits Object.

Public Member Functions

 Substring () noexcept
 
 Substring (const Substring &copy) noexcept
 
Substring operator= (const Substring &assign) noexcept
 
MemoryDiff getOffset () const noexcept
 
MemoryDiff getLength () const noexcept
 
bool isEmpty () const noexcept
 
bool isValid () const noexcept
 
String substring (const String &value)
 
bool isComplete (const String &value) const noexcept
 
 operator bool () const noexcept
 

Detailed Description

Substring descriptor.

Constructor & Destructor Documentation

◆ Substring() [1/2]

RegExp::Substring::Substring ( )
inlinenoexcept

Initializes substring descriptor as invalid.

◆ Substring() [2/2]

RegExp::Substring::Substring ( const Substring copy)
inlinenoexcept

Initializes substring descriptor from other substring descriptor.

Member Function Documentation

◆ getLength()

MemoryDiff RegExp::Substring::getLength ( ) const
inlinenoexcept

Returns the length of the substring.

◆ getOffset()

MemoryDiff RegExp::Substring::getOffset ( ) const
inlinenoexcept

Returns the offset of the substring.

◆ isComplete()

bool RegExp::Substring::isComplete ( const String value) const
inlinenoexcept

Returns true if this object describes the specified string completely.

◆ isEmpty()

bool RegExp::Substring::isEmpty ( ) const
inlinenoexcept

Returns true if the substring is empty.

◆ isValid()

bool RegExp::Substring::isValid ( ) const
inlinenoexcept

Returns true if the substring is valid. Use this method on the substring returned by match(...) to check whether the string matched the regular expression.

◆ operator=()

Substring RegExp::Substring::operator= ( const Substring assign)
inlinenoexcept

Assignment of substring by substring.

◆ substring()

String RegExp::Substring::substring ( const String value)
inline

Returns the substring of the specified string as described by this object.