static function RealisticDummyContentEnvironment::LowercaseRadicalNoExtension in Realistic Dummy Content 7
Returns the part of a string before the extension, in lowercase
Parameters
$filename: A filename string, e.g. rEadmE.txt
Return value
The lowercase radical without the extension, e.g. readme
1 call to RealisticDummyContentEnvironment::LowercaseRadicalNoExtension()
File
- api/
includes/ RealisticDummyContentEnvironment.inc, line 367 - Define RealisticDummyContentLiveEnvironment autoload class.
Class
- RealisticDummyContentEnvironment
- The abstract base environment.
Code
static function LowercaseRadicalNoExtension($filename) {
return drupal_strtolower(trim(preg_replace('/\\.[^\\.]*$/', '', $filename)));
}