You are here

protected function ProjectInfoTrait::getSuffix in Automatic Updates 8

Get string suffix.

Parameters

string $string: The string to parse.

string $needle: The needle.

string $default: The default value.

Return value

string The sub string.

1 call to ProjectInfoTrait::getSuffix()
ProjectInfoTrait::getProjectName in src/ProjectInfoTrait.php
Get the extension's project name.

File

src/ProjectInfoTrait.php, line 126

Class

ProjectInfoTrait
Provide a helper to get project info.

Namespace

Drupal\automatic_updates

Code

protected function getSuffix($string, $needle, $default) {
  $pos = strrpos($string, $needle);
  return $pos === FALSE ? $default : substr($string, ++$pos);
}