Function __global->cms_mb_strcmp

Definitions

sources/global3.php

  • Unicode-safe case-sensitive string comparison.Note we have no cms_mb_strcasecmp because intl (Collator class) cannot do case-insensitive comparison.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$str1 string No No required parameter N/A N/A The first string
$str2 string No No required parameter N/A N/A The second string

Returns

  • <0 if s1<s2, 0 if s1=s2, >1 if s1>s2
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Unicode-safe case-sensitive string comparison.Note we have no cms_mb_strcasecmp because intl (Collator class) cannot do case-insensitive comparison.
 *
 * @param  string $str1 The first string
 * @param  string $str2 The second string
 * @return integer <0 if s1<s2, 0 if s1=s2, >1 if s1>s2
 */

function cms_mb_strcmp(string $str1, string $str2) : int