-
Notifications
You must be signed in to change notification settings - Fork 123
VRage.Game.ModAPI.Ingame.Utilities.TextPtr
← Index ← Namespace Index
public struct TextPtr
A parser utility structure representing a pointer to a location within a string.
Namespace: VRage.Game.ModAPI.Ingame.Utilities
Assembly: VRage.Game.dll
The original content string
The index being pointed at by this structure
Returns the character currently being pointed at, or
\0
if out of bounds
Determines whether this pointer is an empty pointer, i.e. not pointing at anything at all.
TextPtr(string content, int index)
Finds the given text string
Finds the given character
TextPtr FindAny(Char[] chs)
Finds one of the given characters
TextPtr FindAnyInLine(Char[] chs)
Finds one of the given characters within the current line
TextPtr FindEndOfLine(bool skipNewline = default)
Finds the end of the current line
Finds the given character within the current line
Determines what line number this pointer is currently at.
Determines whether the pointer is currently at the end of a line (right before a newline character set or end of the string)
Determines whether the pointer is currently at a newline (end of the string is not a newline)
Determines whether this pointer is currently out of bounds (before or after the string content)
Determines whether the pointer is currently at the beginning of a line (right after a newline character set or start of the string)
TextPtr SkipWhitespace(bool skipNewline = default)
Skips whitespace
Determines if the current pointer location starts with the given string - in a case sensitive manner.
bool StartsWithCaseInsensitive(string what)
Determines if the current pointer location starts with the given string - in a case insensitive manner.
Reverses the pointer location until all whitespace is skipped - does not skip newlines
Advances the pointer location until all whitespace is skipped - does not skip newlines
Do you have questions, comments, suggestions for improvements? Is there something I can do better? Did I make a mistake? Please add an issue here, and prefix your issue title with Wiki. Thank you, your help will be very appreciated!