stripDoubleQuotes.php
Table of Contents
Functions
- stripDoubleQuotes() : string
- Strips a single layer of surrounding `"…"` double quotes from a string.
Functions
stripDoubleQuotes()
Strips a single layer of surrounding `"…"` double quotes from a string.
stripDoubleQuotes(string $value) : string
Compatible with RFC 7230 quoted-string unwrapping, without decoding
\ quoted-pair escapes inside the value (rare for header parameters
in practice).
No-op when:
- the value is shorter than 2 characters,
- the value does not start AND end with
", - only one side is quoted.
Parameters
- $value : string
-
The string to strip.
Tags
Return values
string —The string with one outer pair of double quotes removed, or the original value if no matching pair is found.