public static function string($string, $options = null)
    {
        $options = Helper::getOptions($options, [
            "alt"       =>  "n/a",
        ]);

        $string = trim($string);

        if (!$string) {
            return $options["alt"];
        }

        return $string;
    }
public static function string($string, $options = null)
    {
        $options = Helper::getOptions($options, [
            "alt"       =>  "n/a",
        ]);

        $string = trim($string);

        if (!$string) {
            return $options["alt"];
        }

        return $string;
    }
public static function string ( $ string , $ options = null ) { $ options = Helper :: getOptions ( $ options , [ "alt" => "n/a" , ] ) ; $ string = trim ( $ string ) ; if ( ! $ string ) { return $ options [ "alt" ] ; } return $ string ; }
Trim a string, and return an alternative if it is falsey.

$options:
- string "alt" The string that should be returned if the input is falsey (default: "n/a")

@param string $string The string to format
@param array $options An array of options (see above)

@return string
Trim a string and return an alternative if it is falsey .