VRage.Game.ModAPI.Ingame.Utilities.StringSegment - bimbam2103/space_engineers GitHub Wiki

IndexNamespace Index

StringSegment Struct

public struct StringSegment

Represents a segment of a string.

Namespace: VRage.Game.ModAPI.Ingame.Utilities
Assembly: VRage.Game.dll

Fields

int Length

The length of the segment

int Start

Where the segment starts

string Text

The original text string

Properties

bool IsCached { get; }

Determines whether this segment has been pre-cached in such a way that no allocation will occur when using ToString()

bool IsEmpty { get; }

Determines whether this is an empty/undefined string segment

char Item { get; }

Constructors

StringSegment(string text)

StringSegment(string text, int start, int length)

Methods

bool Equals(object obj)

Indicates whether this instance and a specified object are equal.

bool Equals(string other)

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.

int GetHashCode()

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.

int IndexOf(char ch)

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&#91] 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.

string ToString()

Returns a string containing just this segment.

⚠️ **GitHub.com Fallback** ⚠️