Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


FixedStringMethods

Provides extension methods for FixedString"N"Bytes, NativeText, UnsafeText, and string, including appending, formatting, and parsing numbers.
Read time 2 minutesLast updated 6 days ago

Definition

public static class FixedStringMethods

Static Methods

Method

Description

AppendAppends bytes to this string.
AppendFormatInterpolates strings into a format string and appends the result to this string.
AppendRawByteAppends a byte to this string.
CompareToReturns the sort position of this string relative to a byte sequence.
ComputeHashCodeReturns a hash code of this string.
ContainsReturns true if a given substring occurs within this string.
ConvertToStringReturns a copy of this string as a managed string.
CopyFromCopies another string to this string (making the two strings equal). Replaces any existing content of the FixedString.
CopyFromTruncatedCopies another string to this string. If the string exceeds the capacity it will be truncated. Replaces any existing content of the FixedString.
EffectiveSizeOfReturns the effective size in bytes of this string.
EndsWithReturns true if a given character occurs at the end of this string.
EqualsReturns true if this string and a byte sequence are equal (meaning they have the same length and content).
IndexOfReturns the index of the first occurrence of a byte sequence in this string.
LastIndexOfReturns the index of the last occurrence of a byte sequence within this string.
ParseParses an int from this string starting at a byte offset.
PeekReturns the Unicode.Rune at an index of this string.
ReadReturns the Unicode.Rune at an index of this string. Increments the index to the position of the next character.
StartsWithReturns true if a given character occurs at the beginning of this string.
SubstringRetrieves a substring of this string. The substring starts from a specific character index and continues to the end of the string. The new substring has the same allocator as the string.
ToLowerAsciiConverts string to lowercase only ASCII characters.
ToUpperAsciiConverts string to uppercase only ASCII characters.
TrimRemoves whitespace characters from the begining and the end of the string.
TrimEndRemoves whitespace characters from the end of the string.
TrimStartRemoves whitespace characters from begining of the string.
WriteWrites a Unicode.Rune at an index of this string. Increments the index to the position of the next character.