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 ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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