Assembly: VRage.Game.dll

public struct StringSegment

Represents a segment of a string.

Fields

Member Description
Length The length of the segment
Start Where the segment starts
Text The original text string

Properties

Member Description
IsCached Determines whether this segment has been pre-cached in such a way that no allocation will occur when using ToString()
IsEmpty Determines whether this is an empty/undefined string segment
Item

Constructors

Member Description
StringSegment(string)
StringSegment(string, int, int)

Methods

Member Description
Equals(object) Indicates whether this instance and a specified object are equal.
Equals(string) Compares this string segment with the given string in a case sensitive manner.
Equals(StringSegment) Compares this string segment with another in a case sensitive manner.
EqualsIgnoreCase(string) Compares this string segment with the given string in a case insensitive manner.
EqualsIgnoreCase(StringSegment) Compares this string segment with another in a case insensitive manner.
GetHashCode() Returns the hash code for this instance.
GetLines(List) Fills a list with individual string segments representing the lines of text within this string segment, separated by newlines.
GetLines(List) Fills a list with individual strings representing the lines of text within this string segment, separated by newlines.
IndexOf(char) Reports the zero-based index of the first occurence of the specified character, relative to Start . Returns -1 if nothing was found.
IndexOf(char, int) Reports the zero-based index of the first occurence of the specified character, relative to Start . Returns -1 if nothing was found.
IndexOfAny(Char[]) Reports the zero-based index of the first occurence of one of the provided characters, relative to Start . Returns -1 if nothing was found.
ToString() Returns a string containing just this segment.