HH\Lib\Str\to_int

Meta Engineer?

This is available as Str\to_int in the www repository.

Returns the given string as an integer, or null if the string isn't numeric

namespace HH\Lib\Str;

function to_int(
  string $string,
): ?int;

Guide

Parameters

  • string $string

Returns

  • ?int