Mecha CMS

To::folder()

Sanitize string into safe folder path.

2.0.0Static

To::folder(string $in);

Example:

$A = To::folder('foo / bar / baz .txt / abc $ def $ ghi .txt');

Result:

$A = 'foo/bar/baz-txt/abc-def-ghi-txt';