/**
 * Return Strings object as float.
 *
 * @return float Return Strings object as float.
 */
public function toFloat(): float

Examples

$float = Strings::create('42.10')->toFloat();

echo $float;

The above example will output:

42.10

Getting Started

Methods