Interface IImmutableStringReader
Namespace: Void.Minecraft.Commands.Brigadier
Assembly: Void.Minecraft.dll
Exposes command input and a movable parsing cursor.
public interface IImmutableStringReaderProperties
CanRead
Gets whether at least one character can be read.
bool CanRead { get; }Property Value
Cursor
Gets or sets the zero-based cursor.
int Cursor { get; set; }Property Value
Peek
Gets the character at the current cursor without advancing it.
char Peek { get; }Property Value
Read
Gets the source prefix before the cursor.
string Read { get; }Property Value
Remaining
Gets the source suffix beginning at the cursor.
string Remaining { get; }Property Value
RemainingLength
Gets the number of characters from the cursor through the end.
int RemainingLength { get; }Property Value
Source
Gets the complete source string.
string Source { get; init; }Property Value
TotalLength
Gets the total source length.
int TotalLength { get; }Property Value
Methods
CanReadLength(int)
Determines whether advancing the cursor by length characters remains within the source.
bool CanReadLength(int length)Parameters
length int
The number of characters to test from the current cursor position.
Returns
true when length characters can be read without moving past
PeekAt(int)
Gets a character at an offset from the cursor without advancing it.
char PeekAt(int offset)Parameters
offset int
The relative character offset.
Returns
The selected character.