public static function RealisticDummyContentEnvironment::lowercaseRadicalNoExtension in Realistic Dummy Content 3.x
Same name and namespace in other branches
- 8.2 api/src/includes/RealisticDummyContentEnvironment.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentEnvironment::lowercaseRadicalNoExtension()
- 7.2 api/src/includes/RealisticDummyContentEnvironment.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentEnvironment::lowercaseRadicalNoExtension()
Returns the part of a string before the extension, in lowercase.
Parameters
string $filename: A filename string, e.g. rEadmE.txt.
Return value
string The lowercase radical without the extension, e.g. readme
1 call to RealisticDummyContentEnvironment::lowercaseRadicalNoExtension()
- RealisticDummyContentEnvironment::validCandidateFilename in api/
src/ includes/ RealisticDummyContentEnvironment.php - Checks if a filename is valid.
File
- api/
src/ includes/ RealisticDummyContentEnvironment.php, line 374
Class
- RealisticDummyContentEnvironment
- The abstract base environment.
Namespace
Drupal\realistic_dummy_content_api\includesCode
public static function lowercaseRadicalNoExtension($filename) {
return self::strToLower(trim(preg_replace('/\\.[^\\.]*$/', '', $filename)));
}