I\'m doing some url rewriting in PHP and need to find URLS with a slash at the end and then do a 301 redirect. I thought there\'d be a simple PHP function to find last stri
str_ends_with($string, '/');
New str_starts_with() and str_ends_with() functions are added into the core.
str_starts_with()
str_ends_with()