To::camel()

Converts current value to camel case.

Table of Contents
  1. Description
  2. Example

Description

To::camel(?string $value, bool $accent = false, string $keep = ""): ?string;

This method converts current value to camel case. This method is an alias for function c().

Example

$value = To::camel(""); // Returns `null`
$value = To::camel('!@#$%^&*()'); // Returns `null`
$value = To::camel(" \n\r\t"); // Returns `null`
$value = To::camel('foo bar baz'); // Returns `'fooBarBaz'`
$value = To::camel('FOO BAR BAZ'); // Returns `'FOOBARBAZ'`
$value = To::camel('Foo Bar Baz'); // Returns `'FooBarBaz'`
$value = To::camel('FooBarBaz'); // Returns `'FooBarBaz'`
$value = To::camel('fooBarBaz'); // Returns `'fooBarBaz'`
$value = To::camel('foo-bar-baz'); // Returns `'fooBarBaz'`
$value = To::camel('foo.bar,baz'); // Returns `'fooBarBaz'`
$value = To::camel('foo_bar_baz'); // Returns `'fooBarBaz'`

To::URL()

Converts private file path to public URL, or decodes URL special characters.

To::camel()

Converts current value to camel case.

To::entity()

Converts characters to their corresponding HTML entities.

To::file()

Converts current value to a safe file name.

To::path()

Converts public URL to private file path.