Asposecpplib
System::Drawing::CharacterRange Class Reference

Represents a range of character positions in a string. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...

Public Member Functions

 CharacterRange (int32_t first, int32_t length)
 Constructs a new instance of CharacterRange class that represents the specified range. More...
 
 CharacterRange ()
 Constructs a new instance of CharacterRange class that represents an empty range. More...
 
int32_t get_First () const
 Returns the position of the first character of the range represented by the current object. More...
 
void set_First (int32_t first)
 Sets the position of the first character of the range represented by the current object. More...
 
int32_t get_Length () const
 Returns the number of characters in the range represented by the current object. More...
 
void set_Length (int32_t length)
 Returns the number of characters in the range represented by the current object. More...
 
bool operator== (const CharacterRange &cr) const
 Determines if the current and specified objects represent the same range. More...
 
bool operator!= (const CharacterRange &cr) const
 Determines if the current and specified objects represent distinct ranges. More...
 

Detailed Description

Represents a range of character positions in a string. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

Constructor & Destructor Documentation

◆ CharacterRange() [1/2]

System::Drawing::CharacterRange::CharacterRange ( int32_t  first,
int32_t  length 
)

Constructs a new instance of CharacterRange class that represents the specified range.

Parameters
firstThe position in a string of the first characeter of the range represented by the current object
lengthThe number of characters in the range

◆ CharacterRange() [2/2]

System::Drawing::CharacterRange::CharacterRange ( )

Constructs a new instance of CharacterRange class that represents an empty range.

Member Function Documentation

◆ get_First()

int32_t System::Drawing::CharacterRange::get_First ( ) const

Returns the position of the first character of the range represented by the current object.

◆ get_Length()

int32_t System::Drawing::CharacterRange::get_Length ( ) const

Returns the number of characters in the range represented by the current object.

◆ operator!=()

bool System::Drawing::CharacterRange::operator!= ( const CharacterRange cr) const

Determines if the current and specified objects represent distinct ranges.

Parameters
crThe CharacterRange object to compare the current object with
Returns
True if cr and the current objects represent distinct ranges, otherwise - false

◆ operator==()

bool System::Drawing::CharacterRange::operator== ( const CharacterRange cr) const

Determines if the current and specified objects represent the same range.

Parameters
crThe CharacterRange object to compare the current object with
Returns
True if both cr and the current objects represent the same range, otherwise - false

◆ set_First()

void System::Drawing::CharacterRange::set_First ( int32_t  first)

Sets the position of the first character of the range represented by the current object.

Parameters
firstThe value to set

◆ set_Length()

void System::Drawing::CharacterRange::set_Length ( int32_t  length)

Returns the number of characters in the range represented by the current object.

Parameters
lengthThe value to set