PO::trim_quotes( string $s ): string

In this article

Parameters

$sstringrequired

Return

string

Source

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;
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.