function Unicode::ucfirst
Capitalizes the first character of a UTF-8 string.
Parameters
string $text: The string to convert.
Return value
string The string with the first character as uppercase.
5 calls to Unicode::ucfirst()
- drupal_verify_profile in core/
includes/ install.inc - Verifies that all dependencies are met for a given installation profile.
- HandlerBase::caseTransform in core/
modules/ views/ src/ Plugin/ views/ HandlerBase.php - Transform a string by a certain method.
- OverviewTerms::buildForm in core/
modules/ taxonomy/ src/ Form/ OverviewTerms.php - Form constructor.
- PathBasedBreadcrumbBuilder::build in core/
modules/ system/ src/ PathBasedBreadcrumbBuilder.php - Builds the breadcrumb.
- PathProcessorLanguage::initProcessors in core/
modules/ language/ src/ HttpKernel/ PathProcessorLanguage.php - Initializes the local cache for language path processors.
File
-
core/
lib/ Drupal/ Component/ Utility/ Unicode.php, line 233
Class
- Unicode
- Provides Unicode-related conversions and operations.
Namespace
Drupal\Component\UtilityCode
public static function ucfirst($text) {
return mb_strtoupper(mb_substr($text, 0, 1)) . mb_substr($text, 1);
}