Unicode::strpos

public static Unicode::strpos($haystack, $needle, $offset = 0) Finds the position of the first occurrence of a string in another string. Parameters string $haystack: The string to search in. string $needle: The string to find in $haystack. int $offset: If specified, start the search at this number of characters from the beginning (default 0). Return value int|false The position where $needle occurs in $haystack, always relative to the beginning (independent of $offset), or FALSE if not found.

Unicode::strcasecmp

public static Unicode::strcasecmp($str1, $str2) 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. File core/lib/Drupal/Component/Utility/Unicode.php, line 583 Class Unicode Provides Unicode-related conversions and operations. Namespace Drupal\Component\Utility Cod

Unicode::STATUS_MULTIBYTE

Indicates that full unicode support with the PHP mbstring extension is being used. File core/lib/Drupal/Component/Utility/Unicode.php, line 83 Class Unicode Provides Unicode-related conversions and operations. Namespace Drupal\Component\Utility Code const STATUS_MULTIBYTE = 1;

Unicode::STATUS_ERROR

Indicates an error during check for PHP unicode support. File core/lib/Drupal/Component/Utility/Unicode.php, line 88 Class Unicode Provides Unicode-related conversions and operations. Namespace Drupal\Component\Utility Code const STATUS_ERROR = -1;

Unicode::STATUS_SINGLEBYTE

Indicates that standard PHP (emulated) unicode support is being used. File core/lib/Drupal/Component/Utility/Unicode.php, line 77 Class Unicode Provides Unicode-related conversions and operations. Namespace Drupal\Component\Utility Code const STATUS_SINGLEBYTE = 0;

Unicode::setStatus

public static Unicode::setStatus($status) Sets the value for multibyte support status for the current environment. The following status keys are supported: \Drupal\Component\Utility\Unicode::STATUS_MULTIBYTE Full unicode support using an extension. \Drupal\Component\Utility\Unicode::STATUS_SINGLEBYTE Standard PHP (emulated) unicode support. \Drupal\Component\Utility\Unicode::STATUS_ERROR An error occurred. No unicode support. Parameters int $status: The new status of multibyte support. Fi

Unicode::getStatus

public static Unicode::getStatus() Gets the current status of unicode/multibyte support on this environment. Return value int The status of multibyte support. It can be one of: \Drupal\Component\Utility\Unicode::STATUS_MULTIBYTE Full unicode support using an extension. \Drupal\Component\Utility\Unicode::STATUS_SINGLEBYTE Standard PHP (emulated) unicode support. \Drupal\Component\Utility\Unicode::STATUS_ERROR An error occurred. No unicode support. File core/lib/Drupal/Component/Utility/Uni

Unicode::mimeHeaderEncode

public static Unicode::mimeHeaderEncode($string) Encodes MIME/HTTP headers that contain incorrectly encoded characters. For example, Unicode::mimeHeaderEncode('tést.txt') returns "=?UTF-8?B?dMOpc3QudHh0?=". See http://www.rfc-editor.org/rfc/rfc2047.txt for more information. Notes: Only encode strings that contain non-ASCII characters. We progressively cut-off a chunk with self::truncateBytes(). This ensures each chunk starts and ends on a character boundary. Using \n as the chunk separator may

Unicode::PREG_CLASS_WORD_BOUNDARY

Matches Unicode characters that are word boundaries. Characters with the following General_category (gc) property values are used as word boundaries. While this does not fully conform to the Word Boundaries algorithm described in http://unicode.org/reports/tr29, as PCRE does not contain the Word_Break property table, this simpler algorithm has to do. Cc, Cf, Cn, Co, Cs: Other. Pc, Pd, Pe, Pf, Pi, Po, Ps: Punctuation. Sc, Sk, Sm, So: Symbols. Zl, Zp, Zs: Separators. Non-boundary characters

Unicode::lcfirst

public static Unicode::lcfirst($text) Converts the first character of a UTF-8 string to lowercase. Parameters string $text: The string that will be converted. Return value string The string with the first character as lowercase. Related topics PHP wrapper functions Functions that are wrappers or custom implementations of PHP functions. File core/lib/Drupal/Component/Utility/Unicode.php, line 361 Class Unicode Provides Unicode-related conversions and operations. Namespace Drupal\Comp