You are here

static function Environment::LowercaseRadicalNoExtension in Realistic Dummy Content 8

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 Environment::LowercaseRadicalNoExtension()
Environment::validCandidateFilename in api/src/environments/Environment.php

File

api/src/environments/Environment.php, line 364
Define autoload class.

Class

Environment
The abstract base environment.

Namespace

Drupal\realistic_dummy_content_api\environments

Code

static function LowercaseRadicalNoExtension($filename) {
  return \Drupal\Component\Utility\Unicode::strtolower(trim(preg_replace('/\\.[^\\.]*$/', '', $filename)));
}