Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GenericNumberConverter.php

function GenericNumberConverter::fromHex

@inheritDoc @psalm-pure @psalm-return numeric-string @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty

Overrides NumberConverterInterface::fromHex

File

vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php, line 40

Class

GenericNumberConverter
GenericNumberConverter uses the provided calculator to convert decimal numbers to and from hexadecimal values

Namespace

Ramsey\Uuid\Converter\Number

Code

public function fromHex(string $hex) : string {
    return $this->calculator
        ->fromBase($hex, 16)
        ->toString();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal