src/Support/Str.php
public static function quoteWith($o, $quote = '\'')
    {
        if (strlen($quote) !== 1) {
            throw new InvalidArgumentException('2nd parameter must be single character, two or more characters are given');
        }

        if (is_array($o)) {
            $len = count($o);
            for ($i = 0; $i < $len; $i++) {
                $tmp[$i] = $quote . $o[$i] . $quote;
            }

            return $tmp;
        }

        return $quote . $o . $quote;
    }
public static function quoteWith($o, $quote = '\'')
    {
        if (strlen($quote) !== 1) {
            throw new InvalidArgumentException('2nd parameter must be single character, two or more characters are given');
        }

        if (is_array($o)) {
            $len = count($o);
            for ($i = 0; $i < $len; $i++) {
                $tmp[$i] = $quote . $o[$i] . $quote;
            }

            return $tmp;
        }

        return $quote . $o . $quote;
    }
Quote string with specified character, default character is "'"

@param $o
@param string $quote
@return string
@throws \InvalidArgumentException