function Platform::strlen
Return value
int return a guaranteed binary length of the string, regardless of silly mbstring configs
5 calls to Platform::strlen()
- CurlDownloader::tick in vendor/
composer/ composer/ src/ Composer/ Util/ Http/ CurlDownloader.php - GzipDownloader::extractUsingExt in vendor/
composer/ composer/ src/ Composer/ Downloader/ GzipDownloader.php - RemoteFilesystem::get in vendor/
composer/ composer/ src/ Composer/ Util/ RemoteFilesystem.php - Get file content or copy action.
- RemoteFilesystem::getRemoteContents in vendor/
composer/ composer/ src/ Composer/ Util/ RemoteFilesystem.php - Get contents of remote URL.
- VersionBumper::bumpRequirement in vendor/
composer/ composer/ src/ Composer/ Package/ Version/ VersionBumper.php - Given a constraint, this returns a new constraint with the lower bound bumped to match the given package's version.
File
-
vendor/
composer/ composer/ src/ Composer/ Util/ Platform.php, line 231
Class
- Platform
- Platform helper for uniform platform-specific tests.
Namespace
Composer\UtilCode
public static function strlen(string $str) : int {
static $useMbString = null;
if (null === $useMbString) {
$useMbString = \function_exists('mb_strlen') && (bool) ini_get('mbstring.func_overload');
}
if ($useMbString) {
return mb_strlen($str, '8bit');
}
return \strlen($str);
}