Mecha CMS

Helper functions.

f2c

Convert file name to class name.

2.2.0

f2c(string $value, $accent = false);

Example:

echo f2c('foo');
echo f2c('.foo');
echo f2c('_foo');
echo f2c('foo');
echo f2c('foo-bar');
echo f2c('foo_bar');
echo f2c('foo/bar');
echo f2c('foo/_bar');
echo f2c('foo_/bar');

Result:

Foo
__Foo
_foo
Foo
FooBar
Foo_Bar
Foo\Bar
Foo\_bar
Foo_\Bar