$sstringrequired
public static function trim_quotes( $s ) {
if ( str_starts_with( $s, '"' ) ) {
$s = substr( $s, 1 );
}
if ( str_ends_with( $s, '"' ) ) {
$s = substr( $s, 0, -1 );
}
return $s;
}
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/po/trim_quotes