Lines Matching refs:str
49 …public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = … argument
50 …$attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B')…
54 $attributes['rawValue'] = $str;
56 $string = self::parse($str, $parseUnicodeEscape);
66 * @param string $str String token content
71 public static function parse(string $str, bool $parseUnicodeEscape = true): string { argument
73 if ('b' === $str[0] || 'B' === $str[0]) {
77 if ('\'' === $str[$bLength]) {
81 substr($str, $bLength + 1, -1)
85 substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape
95 * @param string $str String without quotes
101 …public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape … argument
103 $str = str_replace('\\' . $quote, $quote, $str);
114 $str = $matches[1];
116 if (isset(self::$replacements[$str])) {
117 return self::$replacements[$str];
119 if ('x' === $str[0] || 'X' === $str[0]) {
120 return chr(hexdec(substr($str, 1)));
122 if ('u' === $str[0]) {
127 return chr(octdec($str));
130 $str