Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CompareTo

Returns the sort position of this string relative to a byte sequence.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule

CompareTo<T>(T, byte*, int)

Returns the sort position of this string relative to a byte sequence.
public static int CompareTo<T>(this ref T fs, byte* bytes, int bytesLen) where T : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A string to compare.

bytes

A byte sequence to compare.

bytesLen

The number of bytes in the byte sequence.

Returns

Type

Description

intA number denoting the sort position of this string relative to the byte sequence:

CompareTo<T, U>(T, T)

Returns the sort position of this string relative to another.
public static int CompareTo<T, T2>(this ref T fs, in T2 other) where T : unmanaged, INativeList<byte>, IUTF8Bytes where T2 : unmanaged, INativeList<byte>, IUTF8Bytes

Parameters

fs

T
A string to compare.

other

T
Another string to compare.

Returns

Type

Description

intA number denoting the relative sort position of the strings: