\AlphredText

Methods to apply "filters" to text to transform them

Right now, this is, well, "special sauce" and not major. So use it with your own precaution. It is possibly, going to change.

Summary

Methods
Properties
Constants
title_case()
camel_case()
underscore()
hyphenate()
add_commas_to_list()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

title_case()

title_case(string  $string) : string

Convert a string to Title Case

Parameters

string $string

string to be converted

Returns

string —

the string in Title Case

camel_case()

camel_case(string  $string) : string

Converts a string to CamelCase

Parameters

string $string

the string to be converted

Returns

string —

the string in CamelCase

underscore()

underscore(string  $string) : string

Adds underscores to a string

Parameters

string $string

a string to add underscores to

Returns

string —

a string with underscores

hyphenate()

hyphenate(string  $string) : string

Hyphenates a string

Parameters

string $string

the string to hyphenate

Returns

string —

a hyphenated string

add_commas_to_list()

add_commas_to_list(array  $list,   $suffix = false) : string

Adds commas to list (uses Oxford Commas, sorry, it's just proper)

Parameters

array $list

an array to be pushed into a comma-ified string

$suffix

Returns

string —

a string with commas