예제 #1
0
 /**
  * Determines the order in which two strings should appear in a place where it matters, assuming the ascending
  * order, comparing the strings case-sensitively, and using natural order comparison.
  *
  * To illustrate natural order with an example, the strings "a100" and "a20" would get ordered as such with
  * `compare` method, but as "a20" and "a100" with this method, which is the order a human being would choose.
  *
  * @param  string $toString The second string for comparison.
  * @param  bitfield $collationFlags **OPTIONAL. Default is** `COLLATION_DEFAULT`. The collation option(s) to be
  * used for the comparison. The available collation options are `COLLATION_IGNORE_ACCENTS`,
  * `COLLATION_IGNORE_NONWORD`, `COLLATION_UPPERCASE_FIRST`, and `COLLATION_FRENCH` (see [Summary](#summary)).
  * @param  CULocale $inLocale **OPTIONAL. Default is** *the application's default locale*. The locale in which the
  * strings are to be compared.
  *
  * @return int `-1` if *this* string should go before the second string, `1` if the other way around, and `0` if
  * the two strings are equal, taking into account the letter case of the characters.
  */
 public function compareNat($toString, $collationFlags = self::COLLATION_DEFAULT, CULocale $inLocale = null)
 {
     return CUString::compareNat($this, $toString, $collationFlags, $inLocale);
 }