function drupal_strtoupper
7.x unicode.inc | drupal_strtoupper($text) |
6.x unicode.inc | drupal_strtoupper($text) |
Uppercase a UTF-8 string.
Parameters
$text: The string to run the operation on.
Return value
string The string in uppercase.
Related topics
6 calls to drupal_strtoupper()
- DatabaseSchema_mysql::processField in drupal-7.x/
includes/ database/ mysql/ schema.inc - Set database-engine specific properties for a field.
- DatabaseSchema_sqlite::processField in drupal-7.x/
includes/ database/ sqlite/ schema.inc - Set database-engine specific properties for a field.
- DrupalHtmlToTextTestCase::testDrupalHtmlToTextBlockTagToNewline in drupal-7.x/
modules/ simpletest/ tests/ mail.test - Test that text separated by block-level tags in HTML get separated by (at least) a newline in the plaintext version.
- drupal_ucfirst in drupal-7.x/
includes/ unicode.inc - Capitalizes the first letter of a UTF-8 string.
- TableSort::orderByHeader in drupal-7.x/
includes/ tablesort.inc - Order the query based on a header array.
1 string reference to 'drupal_strtoupper'
- drupal_html_to_text in drupal-7.x/
includes/ mail.inc - Transforms an HTML string into plain text, preserving its structure.
File
- drupal-7.x/
includes/ unicode.inc, line 497 - Provides Unicode-related conversions and operations.
Code
function drupal_strtoupper($text) {
global $multibyte;
if ($multibyte == UNICODE_MULTIBYTE) {
return mb_strtoupper($text);
}
else {
// Use C-locale for ASCII-only uppercase
$text = strtoupper($text);
// Case flip Latin-1 accented letters
$text = preg_replace_callback('/\xC3[\xA0-\xB6\xB8-\xBE]/', '_unicode_caseflip', $text);
return $text;
}
}