Yocaml.Filepath
As Wordpress is mainly used to move files, having some functions to work with file names can be a very good idea!
val with_extension : string -> t -> bool
with_extension ext path
returns true
if path
ends with ext
false
otherwise, ie: with_extension "html" "index.html"
returns true
but with_extenstion "html" "foohtml"
returns false
.
Add an extension to a t. For example: add_extension "index.txt" "html"
will produce "index.txt.html"
.