Version 3.3.1.2

StringSlice struct

Namespace: Sirenix.Utilities.Editor
Assembly: Sirenix.Utilities.Editor
public struct StringSlice : IEquatable<string>, IEquatable<StringSlice>

Constructors

StringSlice(String)
public StringSlice(string str)
Parameters
System.String str

StringSlice(String, Int32, Int32)
public StringSlice(string str, int index, int length)
Parameters
System.String str

System.Int32 index

System.Int32 length

Fields

Index
public int Index
Length
public int Length
String
public string String

Properties

Item[Int32]
public char this[int index] { get; }
Parameters
System.Int32 index

Methods

Contains(ref StringSlice)
public bool Contains(ref StringSlice fs)
Parameters
StringSlice fs

Returns
System.Boolean

Contains(String)
public bool Contains(string str)
Parameters
System.String str

Returns
System.Boolean

EndsWith(ref StringSlice)
public bool EndsWith(ref StringSlice fs)
Parameters
StringSlice fs

Returns
System.Boolean

EndsWith(ref String)
public bool EndsWith(ref string str)
Parameters
System.String str

Returns
System.Boolean

Equals(StringSlice)
public bool Equals(StringSlice other)
Parameters
StringSlice other

Returns
System.Boolean

Equals(Object)
public override bool Equals(object obj)
Parameters
System.Object obj

Returns
System.Boolean

Equals(String)
public bool Equals(string other)
Parameters
System.String other

Returns
System.Boolean

FirstIndexOf(Char)
public int FirstIndexOf(char c)
Parameters
System.Char c

Returns
System.Int32

GetHashCode()
public override int GetHashCode()
Returns
System.Int32

LastIndexOf(Char)
public int LastIndexOf(char c)
Parameters
System.Char c

Returns
System.Int32

Slice(Int32)
public StringSlice Slice(int index)
Parameters
System.Int32 index

Returns
StringSlice

Slice(Int32, Int32)
public StringSlice Slice(int index, int length)
Parameters
System.Int32 index

System.Int32 length

Returns
StringSlice

StartsWith(ref StringSlice)
public bool StartsWith(ref StringSlice fs)
Parameters
StringSlice fs

Returns
System.Boolean

StartsWith(String)
public bool StartsWith(string str)
Parameters
System.String str

Returns
System.Boolean

ToString()
public override string ToString()
Returns
System.String

Trim()
public StringSlice Trim()
Returns
StringSlice

TrimEnd()
public StringSlice TrimEnd()
Returns
StringSlice

TrimStart()
public StringSlice TrimStart()
Returns
StringSlice

TryParseToInt(out Int32)
public bool TryParseToInt(out int result)
Parameters
System.Int32 result

Returns
System.Boolean

Operators

Equality(StringSlice, StringSlice)
public static bool operator ==(StringSlice a, StringSlice b)
Parameters
StringSlice a

StringSlice b

Returns
System.Boolean

Equality(StringSlice, String)
public static bool operator ==(StringSlice slice, string str)
Parameters
StringSlice slice

System.String str

Returns
System.Boolean

Explicit(StringSlice to String)
public static explicit operator string (StringSlice slice)
Parameters
StringSlice slice

Returns
System.String

Implicit(String to StringSlice)
public static implicit operator StringSlice(string str)
Parameters
System.String str

Returns
StringSlice

Inequality(StringSlice, StringSlice)
public static bool operator !=(StringSlice a, StringSlice b)
Parameters
StringSlice a

StringSlice b

Returns
System.Boolean

Inequality(StringSlice, String)
public static bool operator !=(StringSlice fs, string str)
Parameters
StringSlice fs

System.String str

Returns
System.Boolean