/**
 * Return Strings object as integer.
 *
 * @return int Return Strings object as integer.
 */
public function toInteger(): int

Examples

$integer = Strings::create('42')->toInteger();

echo $integer;

The above example will output:

42

Getting Started

Methods