isQuoted.php
Table of Contents
Functions
- isQuoted() : bool
- Checks whether a string is wrapped in a matching pair of quote characters.
Functions
isQuoted()
Checks whether a string is wrapped in a matching pair of quote characters.
isQuoted(string $value) : bool
Recognised pairs (symmetric and asymmetric):
'…'single quotes"…"double quotes`…`backticks«…»French guillemets“…”English typographic double quotes‘…’English typographic single quotes / apostrophe
Returns false when the value is shorter than the pair, or when only
one side is quoted.
Parameters
- $value : string
-
The string to test.
Tags
Return values
bool —true if the value starts AND ends with a matching pair.