src/helpers/StringHelper.php
public static function lines(string $str): array
    {
        $lines = BaseStringy::create($str)->lines();

        foreach ($lines as $i => $line) {
            $lines[$i] = $line;
        }

        /** @var string[] $lines */
        return $lines;
    }
public static function lines(string $str): array
    {
        $lines = BaseStringy::create($str)->lines();

        foreach ($lines as $i => $line) {
            $lines[$i] = $line;
        }

        /** @var string[] $lines */
        return $lines;
    }
public static function lines ( string $ str ) : array { $ lines = BaseStringy :: create ( $ str ) -> lines ( ) ; foreach ( $ lines as $ i => $ line ) { $ lines [ $ i ] = $ line ; } /** @var string[] $lines */ return $ lines ; }
Splits on newlines and carriage returns, returning an array of strings corresponding to the lines in the string.

@param string $str The string to split.
@return string[] An array of strings.
Splits on newlines and carriage returns returning an array of strings corresponding to the lines in the string .