Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Unicode.php

function Unicode::strcasecmp

Compares UTF-8-encoded strings in a binary safe case-insensitive manner.

Parameters

string $str1: The first string.

string $str2: The second string.

Return value

int Returns < 0 if $str1 is less than $str2; > 0 if $str1 is greater than $str2, and 0 if they are equal.

1 call to Unicode::strcasecmp()
ImageStyleEditForm::form in core/modules/image/src/Form/ImageStyleEditForm.php
Gets the actual form array to be built.

File

core/lib/Drupal/Component/Utility/Unicode.php, line 366

Class

Unicode
Provides Unicode-related conversions and operations.

Namespace

Drupal\Component\Utility

Code

public static function strcasecmp($str1, $str2) {
    return strcmp(mb_strtoupper($str1), mb_strtoupper($str2));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal