Un motore di ricerca WordPress per sviluppatori e autori di temi



untrailingslashit ›

Da2.2.0
Deprecaton/a
untrailingslashit ( $string )
Parametri:
  • (string) $string What to remove the trailing slashes from.
    Richiesto:
Ritorna:
  • (string) String without the trailing slashes.
Definito a:
Codex:

Removes trailing forward slashes and backslashes if they exist.

The primary use of this is for paths and thus should be used for paths. It is not restricted to paths and offers no specific path support.



Sorgenti

function untrailingslashit( $string ) {
	return rtrim( $string, '/\\' );
}