Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




untrailingslashit [ WordPress Function ]

untrailingslashit ( $string )
Parameters:
  • (string) $string What to remove the trailing slash from.
Returns:
  • (string) String without the trailing slash.
Defined at:



Removes trailing slash if it exists.

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.

Source


<?php
function untrailingslashit($string) {
    return 
rtrim($string'/');
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics