Range
Represents a range of text in a multi-line string.
public class RangeInherits from System.Object
#Constructors
#Range(int, int, int, int)
Initializes a new instance of the Range class, given
start and end information.
public Range(int startLine, int startCharacter, int endLine, int endCharacter)Parameters
startLineintThe zero-indexed line number of the start of the range.startCharacterintThe zero-indexed character number of the start of the range.endLineintThe zero-indexed line number of the end of the range.endCharacterintThe zero-indexed character number of the end of the range.
A range is comparable to a selection in an editor.
Therefore, the end position is exclusive.
#Range(Position, Position)
Initializes a new instance of the Range class, given
start and end information.
public Range(Position startPosition, Position endPosition)Parameters
startPositionYarn.Compiler.PositionThe position at the start of the range.endPositionYarn.Compiler.PositionThe position at the end of the range.
#Fields
#InvalidRange
Represents the default value for a Range.
public static readonly Range InvalidRange = new(-1, -1, -1, -1);Type Range
#Properties
#End
#IsValid
Gets a value indicating whether this range is valid.
public bool IsValid { get; }Type Boolean
A range is valid when its start and end positions are both valid,
and the start position is not after the end position.
#Start
Gets or sets the start position of this range.
public Position Start { get; private set; }Type Position
#Methods
#Equals(object)
public override bool Equals(object obj)Parameters
objobject
Returns Boolean
#GetHashCode()
public override int GetHashCode()Returns Int32
#ToString()
public override string ToString()Returns String
#Operators
#op_Equality(Range, Range)
Compares two Range objects and returns true if they
represent the same range.
(no declaration available)Parameters
a(unknown)The first range.b(unknown)The second range.
Returns Boolean: true if the ranges are
identical.
#op_Inequality(Range, Range)
Compares two Range objects and returns true if they do
not represent the same range.
(no declaration available)Parameters
a(unknown)The first range.b(unknown)The second range.
Returns Boolean: true if the ranges are not
identical.
Generated from Yarn Spinner for Unity 3.3.