N98\Util\Console\Helper\DatabaseHelper::quoteLike PHP Method

quoteLike() private method

quote a string so that it is safe to use in a LIKE
private quoteLike ( string $string, string $escape = '=' ) : string
$string string
$escape string character - single us-ascii character
return string
    private function quoteLike($string, $escape = '=')
    {
        $translation = array($escape => $escape . $escape, '%' => $escape . '%', '_' => $escape . '_');
        return strtr($string, $translation);
    }