public class CharacterRange extends com.aspose.ms.lang.Struct<CharacterRange> implements Cloneable
Specifies a range of character positions within a string.
| Constructor and Description |
|---|
CharacterRange() |
CharacterRange(int first,
int length)
Initializes a new instance of the
CharacterRange struct, specifying a range of character positions within a string. |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
CharacterRange |
Clone() |
void |
CloneTo(CharacterRange that) |
boolean |
equals(Object obj)
Gets a value indicating whether this object is equivalent to the specified object.
|
int |
getFirst()
Gets or sets the position in the string of the first character of this
CharacterRange. |
int |
getLength()
Gets or sets the number of positions in this
CharacterRange. |
int |
hashCode()
Returns the hash code for this instance.
|
static boolean |
op_Equality(CharacterRange cr1,
CharacterRange cr2)
Compares two
CharacterRange objects. |
static boolean |
op_Inequality(CharacterRange cr1,
CharacterRange cr2)
Compares two
CharacterRange objects. |
void |
setFirst(int value)
Gets or sets the position in the string of the first character of this
CharacterRange. |
void |
setLength(int value)
Gets or sets the number of positions in this
CharacterRange. |
public CharacterRange()
public CharacterRange(int first,
int length)
Initializes a new instance of the CharacterRange struct, specifying a range of character positions within a string.
first - The position of the first character in the range. For example, if First is set to 0, the first position of the range is position 0 in the string.length - The number of positions in the range.public final int getFirst()
Gets or sets the position in the string of the first character of this CharacterRange.
CharacterRange.public final void setFirst(int value)
Gets or sets the position in the string of the first character of this CharacterRange.
CharacterRange.public final int getLength()
Gets or sets the number of positions in this CharacterRange.
CharacterRange.public final void setLength(int value)
Gets or sets the number of positions in this CharacterRange.
CharacterRange.public static boolean op_Equality(CharacterRange cr1, CharacterRange cr2)
Compares two CharacterRange objects. Gets a value indicating whether the First and Length values of the two CharacterRange objects are equal.
cr1 - A CharacterRange to compare for equality.cr2 - A CharacterRange to compare for equality.true to indicate the two CharacterRange objects have the same First and Length values; otherwise, false.public static boolean op_Inequality(CharacterRange cr1, CharacterRange cr2)
Compares two CharacterRange objects. Gets a value indicating whether the First or Length values of the two CharacterRange objects are not equal.
cr1 - A CharacterRange to compare for inequality.cr2 - A CharacterRange to compare for inequality.true to indicate the either the First or Length values of the two CharacterRange objects differ; otherwise, false.public boolean equals(Object obj)
Gets a value indicating whether this object is equivalent to the specified object.
public int hashCode()
Returns the hash code for this instance.
public void CloneTo(CharacterRange that)
CloneTo in class com.aspose.ms.System.ValueType<CharacterRange>public CharacterRange Clone()
Clone in class com.aspose.ms.System.ValueType<CharacterRange>Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.