Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.String Class Referencesealed

Classes

struct  ProbabilisticMap
 

Public Member Functions

int CompareTo (object? value)
 
int CompareTo (string? strB)
 
bool EndsWith (string value)
 
bool EndsWith (string value, StringComparison comparisonType)
 
bool EndsWith (string value, bool ignoreCase, CultureInfo? culture)
 
bool EndsWith (char value)
 
override bool Equals ([NotNullWhen(true)] object? obj)
 
bool Equals ([NotNullWhen(true)] string? value)
 
bool Equals ([NotNullWhen(true)] string? value, StringComparison comparisonType)
 
override int GetHashCode ()
 
int GetHashCode (StringComparison comparisonType)
 
bool StartsWith (string value)
 
bool StartsWith (string value, StringComparison comparisonType)
 
bool StartsWith (string value, bool ignoreCase, CultureInfo? culture)
 
bool StartsWith (char value)
 
 String (char[]? value)
 
 String (char[] value, int startIndex, int length)
 
unsafe String (char *value)
 
unsafe String (char *value, int startIndex, int length)
 
unsafe String (sbyte *value)
 
unsafe String (sbyte *value, int startIndex, int length)
 
unsafe String (sbyte *value, int startIndex, int length, Encoding enc)
 
 String (char c, int count)
 
 String (ReadOnlySpan< char > value)
 
object Clone ()
 
void CopyTo (int sourceIndex, char[] destination, int destinationIndex, int count)
 
void CopyTo (Span< char > destination)
 
bool TryCopyTo (Span< char > destination)
 
char[] ToCharArray ()
 
char[] ToCharArray (int startIndex, int length)
 
ref readonly char GetPinnableReference ()
 
override string ToString ()
 
string ToString (IFormatProvider? provider)
 
CharEnumerator GetEnumerator ()
 
StringRuneEnumerator EnumerateRunes ()
 
TypeCode GetTypeCode ()
 
bool IsNormalized ()
 
bool IsNormalized (NormalizationForm normalizationForm)
 
string Normalize ()
 
string Normalize (NormalizationForm normalizationForm)
 
string Insert (int startIndex, string value)
 
string PadLeft (int totalWidth)
 
string PadLeft (int totalWidth, char paddingChar)
 
string PadRight (int totalWidth)
 
string PadRight (int totalWidth, char paddingChar)
 
string Remove (int startIndex, int count)
 
string Remove (int startIndex)
 
string Replace (string oldValue, string? newValue, bool ignoreCase, CultureInfo? culture)
 
string Replace (string oldValue, string? newValue, StringComparison comparisonType)
 
string Replace (char oldChar, char newChar)
 
string Replace (string oldValue, string? newValue)
 
string ReplaceLineEndings ()
 
string ReplaceLineEndings (string replacementText)
 
string[] Split (char separator, StringSplitOptions options=StringSplitOptions.None)
 
string[] Split (char separator, int count, StringSplitOptions options=StringSplitOptions.None)
 
string[] Split (params char[]? separator)
 
string[] Split (char[]? separator, int count)
 
string[] Split (char[]? separator, StringSplitOptions options)
 
string[] Split (char[]? separator, int count, StringSplitOptions options)
 
string[] Split (string? separator, StringSplitOptions options=StringSplitOptions.None)
 
string[] Split (string? separator, int count, StringSplitOptions options=StringSplitOptions.None)
 
string[] Split (string[]? separator, StringSplitOptions options)
 
string[] Split (string[]? separator, int count, StringSplitOptions options)
 
string Substring (int startIndex)
 
string Substring (int startIndex, int length)
 
string ToLower ()
 
string ToLower (CultureInfo? culture)
 
string ToLowerInvariant ()
 
string ToUpper ()
 
string ToUpper (CultureInfo? culture)
 
string ToUpperInvariant ()
 
string Trim ()
 
unsafe string Trim (char trimChar)
 
unsafe string Trim (params char[]? trimChars)
 
string TrimStart ()
 
unsafe string TrimStart (char trimChar)
 
unsafe string TrimStart (params char[]? trimChars)
 
string TrimEnd ()
 
unsafe string TrimEnd (char trimChar)
 
unsafe string TrimEnd (params char[]? trimChars)
 
bool Contains (string value)
 
bool Contains (string value, StringComparison comparisonType)
 
bool Contains (char value)
 
bool Contains (char value, StringComparison comparisonType)
 
int IndexOf (char value)
 
int IndexOf (char value, int startIndex)
 
int IndexOf (char value, StringComparison comparisonType)
 
int IndexOf (char value, int startIndex, int count)
 
int IndexOfAny (char[] anyOf)
 
int IndexOfAny (char[] anyOf, int startIndex)
 
int IndexOfAny (char[] anyOf, int startIndex, int count)
 
int IndexOf (string value)
 
int IndexOf (string value, int startIndex)
 
int IndexOf (string value, int startIndex, int count)
 
int IndexOf (string value, StringComparison comparisonType)
 
int IndexOf (string value, int startIndex, StringComparison comparisonType)
 
int IndexOf (string value, int startIndex, int count, StringComparison comparisonType)
 
int LastIndexOf (char value)
 
int LastIndexOf (char value, int startIndex)
 
int LastIndexOf (char value, int startIndex, int count)
 
int LastIndexOfAny (char[] anyOf)
 
int LastIndexOfAny (char[] anyOf, int startIndex)
 
int LastIndexOfAny (char[] anyOf, int startIndex, int count)
 
int LastIndexOf (string value)
 
int LastIndexOf (string value, int startIndex)
 
int LastIndexOf (string value, int startIndex, int count)
 
int LastIndexOf (string value, StringComparison comparisonType)
 
int LastIndexOf (string value, int startIndex, StringComparison comparisonType)
 
int LastIndexOf (string value, int startIndex, int count, StringComparison comparisonType)
 
int CompareTo (T? other)
 
bool ToBoolean (IFormatProvider? provider)
 
char ToChar (IFormatProvider? provider)
 
sbyte ToSByte (IFormatProvider? provider)
 
byte ToByte (IFormatProvider? provider)
 
short ToInt16 (IFormatProvider? provider)
 
ushort ToUInt16 (IFormatProvider? provider)
 
int ToInt32 (IFormatProvider? provider)
 
uint ToUInt32 (IFormatProvider? provider)
 
long ToInt64 (IFormatProvider? provider)
 
ulong ToUInt64 (IFormatProvider? provider)
 
float ToSingle (IFormatProvider? provider)
 
double ToDouble (IFormatProvider? provider)
 
decimal ToDecimal (IFormatProvider? provider)
 
DateTime ToDateTime (IFormatProvider? provider)
 
object ToType (Type conversionType, IFormatProvider? provider)
 
int CompareTo (T? other)
 
bool Equals (T? other)
 

Static Public Member Functions

static string Intern (string str)
 
static ? string IsInterned (string str)
 
static int Compare (string? strA, string? strB)
 
static int Compare (string? strA, string? strB, bool ignoreCase)
 
static int Compare (string? strA, string? strB, StringComparison comparisonType)
 
static int Compare (string? strA, string? strB, CultureInfo? culture, CompareOptions options)
 
static int Compare (string? strA, string? strB, bool ignoreCase, CultureInfo? culture)
 
static int Compare (string? strA, int indexA, string? strB, int indexB, int length)
 
static int Compare (string? strA, int indexA, string? strB, int indexB, int length, bool ignoreCase)
 
static int Compare (string? strA, int indexA, string? strB, int indexB, int length, bool ignoreCase, CultureInfo? culture)
 
static int Compare (string? strA, int indexA, string? strB, int indexB, int length, CultureInfo? culture, CompareOptions options)
 
static int Compare (string? strA, int indexA, string? strB, int indexB, int length, StringComparison comparisonType)
 
static int CompareOrdinal (string? strA, string? strB)
 
static int CompareOrdinal (string? strA, int indexA, string? strB, int indexB, int length)
 
static bool Equals (string? a, string? b)
 
static bool Equals (string? a, string? b, StringComparison comparisonType)
 
static bool operator== (string? a, string? b)
 
static bool operator!= (string? a, string? b)
 
static int GetHashCode (ReadOnlySpan< char > value)
 
static int GetHashCode (ReadOnlySpan< char > value, StringComparison comparisonType)
 
static string Create< TState > (int length, TState state, SpanAction< char, TState > action)
 
static string Create (IFormatProvider? provider, [InterpolatedStringHandlerArgument("provider")] ref DefaultInterpolatedStringHandler handler)
 
static string Create (IFormatProvider? provider, Span< char > initialBuffer, [InterpolatedStringHandlerArgument(new string[] { "provider", "initialBuffer" })] ref DefaultInterpolatedStringHandler handler)
 
static implicit operator ReadOnlySpan< char > (string? value)
 
static string Copy (string str)
 
static bool IsNullOrEmpty ([NotNullWhen(false)] string? value)
 
static bool IsNullOrWhiteSpace ([NotNullWhen(false)] string? value)
 
static string Concat (object? arg0)
 
static string Concat (object? arg0, object? arg1)
 
static string Concat (object? arg0, object? arg1, object? arg2)
 
static string Concat (params object?[] args)
 
static string Concat< T > (IEnumerable< T > values)
 
static string Concat (IEnumerable< string?> values)
 
static string Concat (string? str0, string? str1)
 
static string Concat (string? str0, string? str1, string? str2)
 
static string Concat (string? str0, string? str1, string? str2, string? str3)
 
static string Concat (ReadOnlySpan< char > str0, ReadOnlySpan< char > str1)
 
static string Concat (ReadOnlySpan< char > str0, ReadOnlySpan< char > str1, ReadOnlySpan< char > str2)
 
static string Concat (ReadOnlySpan< char > str0, ReadOnlySpan< char > str1, ReadOnlySpan< char > str2, ReadOnlySpan< char > str3)
 
static string Concat (params string?[] values)
 
static string Format (string format, object? arg0)
 
static string Format (string format, object? arg0, object? arg1)
 
static string Format (string format, object? arg0, object? arg1, object? arg2)
 
static string Format (string format, params object?[] args)
 
static string Format (IFormatProvider? provider, string format, object? arg0)
 
static string Format (IFormatProvider? provider, string format, object? arg0, object? arg1)
 
static string Format (IFormatProvider? provider, string format, object? arg0, object? arg1, object? arg2)
 
static string Format (IFormatProvider? provider, string format, params object?[] args)
 
static string Join (char separator, params string?[] value)
 
static string Join (string? separator, params string?[] value)
 
static string Join (char separator, string?[] value, int startIndex, int count)
 
static string Join (string? separator, string?[] value, int startIndex, int count)
 
static string Join (string? separator, IEnumerable< string?> values)
 
static string Join (char separator, params object?[] values)
 
static string Join (string? separator, params object?[] values)
 
static string Join< T > (char separator, IEnumerable< T > values)
 
static string Join< T > (string? separator, IEnumerable< T > values)
 

Static Public Attributes

static readonly string Empty
 

Package Functions

static string FastAllocateString (int length)
 
void SetTrailByte (byte data)
 
bool TryGetTrailByte (out byte data)
 
unsafe int GetBytesFromEncoding (byte *pbNativeBuffer, int cbNativeBuffer, Encoding encoding)
 
int GetHashCodeOrdinalIgnoreCase ()
 
unsafe int GetNonRandomizedHashCode ()
 
unsafe int GetNonRandomizedHashCodeOrdinalIgnoreCase ()
 
bool TryGetSpan (int startIndex, int count, out ReadOnlySpan< char > slice)
 
ref char GetRawStringData ()
 

Static Package Functions

static unsafe void InternalCopy (string src, IntPtr dest, int len)
 
static bool EqualsOrdinalIgnoreCase (string strA, string strB)
 
static int CompareOrdinal (ReadOnlySpan< char > strA, ReadOnlySpan< char > strB)
 
static int GetHashCodeOrdinalIgnoreCase (ReadOnlySpan< char > value)
 
static void CheckStringComparison (StringComparison comparisonType)
 
static CompareOptions GetCaseCompareOfComparisonCulture (StringComparison comparisonType)
 
static unsafe string CreateStringFromEncoding (byte *bytes, int byteLength, Encoding encoding)
 
static string CreateFromChar (char c)
 
static string CreateFromChar (char c1, char c2)
 
static unsafe int wcslen (char *ptr)
 
static unsafe int strlen (byte *ptr)
 
static int IndexOfNewlineChar (ReadOnlySpan< char > text, out int stride)
 

Properties

char this[int index] [get]
 
int Length [get]
 

Private Member Functions

string Intern ()
 
string IsInterned ()
 
string Ctor (char[] value)
 
string Ctor (char[] value, int startIndex, int length)
 
unsafe string Ctor (char *ptr)
 
unsafe string Ctor (char *ptr, int startIndex, int length)
 
unsafe string Ctor (sbyte *value)
 
unsafe string Ctor (sbyte *value, int startIndex, int length)
 
unsafe string Ctor (sbyte *value, int startIndex, int length, Encoding enc)
 
unsafe string Ctor (char c, int count)
 
string Ctor (ReadOnlySpan< char > value)
 
IEnumerator< char > IEnumerable< char >. GetEnumerator ()
 
IEnumerator IEnumerable. GetEnumerator ()
 
bool IConvertible. ToBoolean (IFormatProvider provider)
 
char IConvertible. ToChar (IFormatProvider provider)
 
sbyte IConvertible. ToSByte (IFormatProvider provider)
 
byte IConvertible. ToByte (IFormatProvider provider)
 
short IConvertible. ToInt16 (IFormatProvider provider)
 
ushort IConvertible. ToUInt16 (IFormatProvider provider)
 
int IConvertible. ToInt32 (IFormatProvider provider)
 
uint IConvertible. ToUInt32 (IFormatProvider provider)
 
long IConvertible. ToInt64 (IFormatProvider provider)
 
ulong IConvertible. ToUInt64 (IFormatProvider provider)
 
float IConvertible. ToSingle (IFormatProvider provider)
 
double IConvertible. ToDouble (IFormatProvider provider)
 
decimal IConvertible. ToDecimal (IFormatProvider provider)
 
DateTime IConvertible. ToDateTime (IFormatProvider provider)
 
object IConvertible. ToType (Type type, IFormatProvider provider)
 
unsafe bool IsAscii ()
 
string ReplaceCore (string oldValue, string newValue, CompareInfo ci, CompareOptions options)
 
string ReplaceHelper (int oldValueLength, string newValue, ReadOnlySpan< int > indices)
 
string[] SplitInternal (ReadOnlySpan< char > separators, int count, StringSplitOptions options)
 
string[] SplitInternal (string separator, string[] separators, int count, StringSplitOptions options)
 
string[] SplitInternal (string separator, int count, StringSplitOptions options)
 
string[] SplitWithoutPostProcessing (ReadOnlySpan< int > sepList, ReadOnlySpan< int > lengthList, int defaultLength, int count)
 
string[] SplitWithPostProcessing (ReadOnlySpan< int > sepList, ReadOnlySpan< int > lengthList, int defaultLength, int count, StringSplitOptions options)
 
unsafe void MakeSeparatorList (ReadOnlySpan< char > separators, ref ValueListBuilder< int > sepListBuilder)
 
void MakeSeparatorListVectorized (ref ValueListBuilder< int > sepListBuilder, char c, char c2, char c3)
 
void MakeSeparatorList (string separator, ref ValueListBuilder< int > sepListBuilder)
 
void MakeSeparatorList (string[] separators, ref ValueListBuilder< int > sepListBuilder, ref ValueListBuilder< int > lengthListBuilder)
 
string InternalSubString (int startIndex, int length)
 
string TrimWhiteSpaceHelper (TrimType trimType)
 
unsafe string TrimHelper (char *trimChars, int trimCharsLength, TrimType trimType)
 
string CreateTrimmedString (int start, int end)
 
unsafe int IndexOfCharArray (char[] anyOf, int startIndex, int count)
 
unsafe int LastIndexOfCharArray (char[] anyOf, int startIndex, int count)
 

Static Private Member Functions

static bool EqualsHelper (string strA, string strB)
 
static int CompareOrdinalHelper (string strA, int indexA, int countA, string strB, int indexB, int countB)
 
static bool EqualsOrdinalIgnoreCaseNoLengthCheck (string strA, string strB)
 
static unsafe int CompareOrdinalHelper (string strA, string strB)
 
static CompareOptions GetCompareOptionsFromOrdinalStringComparison (StringComparison comparisonType)
 
static unsafe string CreateStringForSByteConstructor (byte *pb, int numBytes)
 
static void ThrowMustBeNullTerminatedString ()
 
static void FillStringChecked (string dest, int destPos, string src)
 
static string FormatHelper (IFormatProvider provider, string format, ParamsArray args)
 
static string JoinCore (ReadOnlySpan< char > separator, string[] value, int startIndex, int count)
 
static string JoinCore (ReadOnlySpan< char > separator, object[] values)
 
static string JoinCore< T > (ReadOnlySpan< char > separator, IEnumerable< T > values)
 
static string JoinCore (ReadOnlySpan< char > separator, ReadOnlySpan< string > values)
 
static string ReplaceCore (ReadOnlySpan< char > searchSpace, ReadOnlySpan< char > oldValue, ReadOnlySpan< char > newValue, CompareInfo compareInfo, CompareOptions options)
 
static void CheckStringSplitOptions (StringSplitOptions options)
 
static unsafe void InitializeProbabilisticMap (uint *charMap, ReadOnlySpan< char > anyOf)
 
static bool ArrayContains (char searchChar, char[] anyOf)
 
static unsafe bool IsCharBitSet (uint *charMap, byte value)
 
static unsafe void SetCharBit (uint *charMap, byte value)
 

Private Attributes

readonly int _stringLength
 
char _firstChar
 

Detailed Description

Definition at line 21 of file String.cs.


The documentation for this class was generated from the following file: