This repository was archived by the owner on Dec 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
VRage.Game.ModAPI.Ingame.Utilities.TextPtr
Morten Aune Lyrstad edited this page Nov 26, 2020
·
44 revisions
← Index ← Namespace Index
public struct TextPtrA parser utility structure representing a pointer to a location within a string.
Namespace: VRage.Game.ModAPI.Ingame.Utilities
Assembly: VRage.Game.dll
| Member | Description |
|---|---|
| Content | The original content string |
| Index | The index being pointed at by this structure |
| Member | Description |
|---|---|
| Char { get; } | Returns the character currently being pointed at, or\0if out of bounds |
| IsEmpty { get; } | Determines whether this pointer is an empty pointer, i.e. not pointing at anything at all. |
| Member | Description |
|---|---|
| TextPtr(string) | |
| TextPtr(string, int) |
| Member | Description |
|---|---|
| IsOutOfBounds() | Determines whether this pointer is currently out of bounds (before or after the string content) |
| FindLineNo() | Determines what line number this pointer is currently at. |
| Find(string) | Finds the given text string |
| Find(char) | Finds the given character |
| FindAny(Char[]) | Finds one of the given characters |
| FindInLine(char) | Finds the given character within the current line |
| FindAnyInLine(Char[]) | Finds one of the given characters within the current line |
| FindEndOfLine(bool) | Finds the end of the current line |
| StartsWithCaseInsensitive(string) | Determines if the current pointer location starts with the given string - in a case insensitive manner. |
| StartsWith(string) | Determines if the current pointer location starts with the given string - in a case sensitive manner. |
| SkipWhitespace(bool) | Skips whitespace |
| IsEndOfLine() | Determines whether the pointer is currently at the end of a line (right before a newline character set or end of the string) |
| IsStartOfLine() | Determines whether the pointer is currently at the beginning of a line (right after a newline character set or start of the string) |
| IsNewLine() | Determines whether the pointer is currently at a newline (end of the string is not a newline) |
| TrimStart() | Advances the pointer location until all whitespace is skipped - does not skip newlines |
| TrimEnd() | Reverses 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!