public static function Number::alphadecimalToInt in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Component/Utility/Number.php \Drupal\Component\Utility\Number::alphadecimalToInt()
Decodes a sorting code back to an integer.
Parameters
string $string: The alpha decimal value to convert
Return value
int The integer value.
See also
\Drupal\Component\Utility\Number::intToAlphadecimal
2 calls to Number::alphadecimalToInt()
- Comment::preSave in core/modules/ comment/ src/ Entity/ Comment.php 
- Acts on an entity before the presave hook is invoked.
- NumberTest::testConversions in core/tests/ Drupal/ Tests/ Component/ Utility/ NumberTest.php 
- Tests the alphadecimal conversion functions.
File
- core/lib/ Drupal/ Component/ Utility/ Number.php, line 101 
- Contains \Drupal\Component\Utility\Number.
Class
- Number
- Provides helper methods for manipulating numbers.
Namespace
Drupal\Component\UtilityCode
public static function alphadecimalToInt($string = '00') {
  return (int) base_convert(substr($string, 1), 36, 10);
}