-
Notifications
You must be signed in to change notification settings - Fork 127
VRage.Game.ModAPI.Ingame.Utilities.StringSegment
← Index ← Namespace Index
public struct StringSegment
Represents a segment of a string.
Namespace: VRage.Game.ModAPI.Ingame.Utilities
Assembly: VRage.Game.dll
The length of the segment
Where the segment starts
The original text string
Determines whether this segment has been pre-cached in such a way that no allocation will occur when using ToString()
Determines whether this is an empty/undefined string segment
StringSegment(string text, int start, int length)
Indicates whether this instance and a specified object are equal.
Compares this string segment with the given string in a case sensitive manner.
bool Equals(StringSegment other)
Compares this string segment with another in a case sensitive manner.
bool EqualsIgnoreCase(string other)
Compares this string segment with the given string in a case insensitive manner.
bool EqualsIgnoreCase(StringSegment other)
Compares this string segment with another in a case insensitive manner.
Returns the hash code for this instance.
void GetLines(List<StringSegment> lines)
Fills a list with individual string segments representing the lines of text within this string segment, separated by newlines.
void GetLines(List<string> lines)
Fills a list with individual strings representing the lines of text within this string segment, separated by newlines.
Reports the zero-based index of the first occurence of the specified character, relative to Start . Returns -1 if nothing was found.
int IndexOf(char ch, int start)
Reports the zero-based index of the first occurence of the specified character, relative to Start . Returns -1 if nothing was found.
int IndexOfAny(Char[] chars)
Reports the zero-based index of the first occurence of one of the provided characters, relative to Start . Returns -1 if nothing was found.
Returns a string containing just this segment.
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!