ICharIterator Interface
Provides a common interface for iterating characters over a StringSlice or StringLineGroup.
public interface ICharIteratorProperties
| Name | Description |
|---|---|
| CurrentChar | Gets the current character. |
| End | Gets the end character position. |
| IsEmpty | Gets a value indicating whether this instance is empty. |
| Start | Gets the current start character position. |
CurrentChar
End
IsEmpty
Start
Methods
| Name | Description |
|---|---|
| NextChar() | Goes to the next character, incrementing the ICharIterator.Start position. |
| PeekChar() | Peeks at the next character, without incrementing the ICharIterator.Start position. |
| PeekChar(int) | Peeks at the next character, without incrementing the ICharIterator.Start position. |
| SkipChar() | Goes to the next character, incrementing the ICharIterator.Start position. |
| TrimStart() | Trims whitespaces at the beginning of this slice starting from ICharIterator.Start position. |
NextChar()
Goes to the next character, incrementing the ICharIterator.Start position.
char NextChar()Returns
char The next character. `\0` is end of the iteration.
PeekChar overloads
PeekChar()
Peeks at the next character, without incrementing the ICharIterator.Start position.
char PeekChar()Returns
char The next character. `\0` is end of the iteration.
PeekChar(int)
Peeks at the next character, without incrementing the ICharIterator.Start position.
SkipChar()
Goes to the next character, incrementing the ICharIterator.Start position.
void SkipChar()TrimStart()
Trims whitespaces at the beginning of this slice starting from ICharIterator.Start position.
bool TrimStart()Returns
bool true if it has reaches the end of the iterator