Example #1
0
 /// <summary>
 /// Compares the two specified strings.
 /// </summary>
 /// <param name="strA">The first string to compare</param>
 /// <param name="strB">The second string to compare</param>
 /// <returns>
 /// 0 if both strings are null or they are equal; a negative number if strA == null or
 /// is lexicographically before strB; a positive number otherwise
 /// </returns>
 public static int Compare(UTF32String strA, UTF32String strB)
 {
     return(ReferenceEquals(strA, strB)
                                         ? 0
                                         : (object)strA == null || (object)strB == null
                                                 ? (object)strA == null
                                                         ? -1
                                                         : 1
                                                 : strA.CompareTo(strB));
 }