Scripting API

FixedStringMethods

static class in Unity.Collections · Unity.Collections

21 of 25 of Unity's members
In Tassix

What fixed strings (and other UTF-8 containers) share: appending text, runes and numbers (formatted as Unity formats them), copying, searching, comparing and hashing.

Methods 21

static FormatError Append<T>(ref this T fs, Unicode.Rune rune)
static FormatError Append<T>(ref this T fs, char ch)
static FormatError Append<T>(ref this T fs, Unicode.Rune rune, int repeatCount)
static FormatError Append<T>(ref this T fs, byte* utf8Bytes, int utf8BytesLength)
static FormatError Append<T, T2>(ref this T fs, in T2 input)
static FormatError Append<T>(ref this T fs, string s)
static FormatError Append<T>(ref this T fs, long input)
static FormatError Append<T>(ref this T fs, int input)
static FormatError Append<T>(ref this T fs, ulong input)
static FormatError Append<T>(ref this T fs, uint input)
static FormatError Append<T>(ref this T fs, float input, char decimalSeparator = '.')

A float, as Unity's fixed strings write it: up to 7 significant digits, scientific past 4 zeros.

static FormatError AppendRawByte<T>(ref this T fs, byte a)
static int CompareTo<T, T2>(ref this T fs, in T2 other)

Compares by code point; negative, zero or positive.

static int ComputeHashCode<T>(ref this T fs)
static bool Contains<T, T2>(ref this T fs, in T2 other)
static string ConvertToString<T>(ref this T fs)
static CopyError CopyFrom<T>(ref this T fs, string source)
static FormatError CopyFrom<T, T2>(ref this T fs, in T2 input)

Copies what fits (whole code points); Truncation if not all of it did.

static CopyError CopyFromTruncated<T>(ref this T fs, string source)
static int EffectiveSizeOf<T>(ref this T fs)
static bool EndsWith<T, T2>(ref this T fs, in T2 other)
static bool Equals<T, T2>(ref this T fs, in T2 other)
static int IndexOf<T>(ref this T fs, byte* bytes, int bytesLen)
static int IndexOf<T>(ref this T fs, byte* bytes, int bytesLen, int startIndex, int distance = int.MaxValue)
static int IndexOf<T, T2>(ref this T fs, in T2 other)
static int IndexOf<T, T2>(ref this T fs, in T2 other, int startIndex)
static int LastIndexOf<T, T2>(ref this T fs, in T2 other)
static ParseError Parse<T>(ref this T fs, ref int offset, ref int output)
static ParseError Parse<T>(ref this T fs, ref int offset, ref uint output)
static ParseError Parse<T>(ref this T fs, ref int offset, ref float output, char decimalSeparator = '.')
static bool StartsWith<T, T2>(ref this T fs, in T2 other)
static T Substring<T>(ref this T fs, int startIndex, int length)
static T Substring<T>(ref this T fs, int startIndex)
static T ToLowerAscii<T>(ref this T fs)
static T ToUpperAscii<T>(ref this T fs)
static T Trim<T>(ref this T fs)
static T TrimEnd<T>(ref this T fs)
static T TrimStart<T>(ref this T fs)

Not in Tassix yet 4

AppendFormat Peek Read Write