Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

FixedStringMethods.CompareTo

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static int CompareTo(ref T fs, byte* bytes, int bytesLen);

Parameters

Parameter Description
fs A string to compare.
bytes A byte sequence to compare.
bytesLen The number of bytes in the byte sequence.

Returns

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

0 denotes that this string and byte sequence have the same sort position. -1 denotes that this string should be sorted to precede the byte sequence. +1 denotes that this string should be sorted to follow the byte sequence.

Description

Returns the sort position of this string relative to a byte sequence.


Declaration

public static int CompareTo(ref T fs, ref T2 other);

Parameters

Parameter Description
fs A string to compare.
other Another string to compare.

Returns

int A number denoting the relative sort position of the strings:

0 denotes that the strings have the same sort position. -1 denotes that this string should be sorted to precede the other. +1 denotes that this first string should be sorted to follow the other.

Description

Returns the sort position of this string relative to another.