Mike42\Escpos\PrintConnectors\CupsPrintConnector::chopLpstatLine PHP Method

chopLpstatLine() private method

Get the item before the first space in a string
private chopLpstatLine ( string $line ) : string
$line string
return string the string, up to the first space, or the whole string if it contains no spaces.
    private function chopLpstatLine($line)
    {
        if (($pos = strpos($line, " ")) === false) {
            return $line;
        } else {
            return substr($line, 0, $pos);
        }
    }