Lines Matching defs:string
81 public static function isEscapable(string $character): bool
89 public static function isLetter(?string $character): bool
99 * Attempt to match a regex in string s at offset offset
101 * @psalm-param non-empty-string $regex
107 public static function matchAt(string $regex, string $string, int $offset = 0): ?int
110 $string = \mb_substr($string, $offset, null, 'UTF-8');
111 if (! \preg_match($regex, $string, $matches, \PREG_OFFSET_CAPTURE)) {
116 $charPos = \mb_strlen(\mb_strcut($string, 0, $matches[0][1], 'UTF-8'), 'UTF-8');
124 * @psalm-param non-empty-string $pattern
126 * @return string[]|null
130 public static function matchFirst(string $pattern, string $subject, int $offset = 0): ?array
150 public static function unescape(string $string): string
154 $escaped = \preg_replace($allEscapedChar, '$1', $string);
169 * @psalm-return non-empty-string
175 public static function getHtmlBlockOpenRegex(int $type): string
206 * @psalm-return non-empty-string
212 public static function getHtmlBlockCloseRegex(int $type): string
233 public static function isLinkPotentiallyUnsafe(string $url): bool