You are here

public function Identifier::removeLeft in Markdown 8.2

Removes a specific string from the left side of the identifier.

Parameters

string|int $value: A string value or length to remove.

Return value

string|void A substring of the identifier without the value or length passed.

File

src/Annotation/Identifier.php, line 223

Class

Identifier
Creates an identifier for use in annotation objects.

Namespace

Drupal\markdown\Annotation

Code

public function removeLeft($value) {
  if (!is_numeric($value)) {
    $value = $this
      ->startsWith($value) ? strlen($value) : NULL;
  }
  if (isset($value) && ($return = substr($this->value, (int) $value)) && $return !== FALSE) {
    return $return;
  }
}