Skip to content

Commit

Permalink
Update README.markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
dawesi authored Nov 20, 2019
1 parent 4535b84 commit 51605db
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# CFML Inflector

This is a CFML (Lucee/Cold Fusion) component which provides the ability to transform
words from singular to plural (and back again), capitalises, PascelCase or CamelCases
and humanises. It is based on the Ruby on Rails
[ActiveSupport::Inflector][rails-inflector] class.
This is a CFML (Lucee/Cold Fusion) component which provides the ability to transform words from singular to plural (and back again), capitalises, PascelCase or CamelCases and humanises.

It is based on a combination of inflector clases openly available under MIT licence.

## Example Usage

Expand All @@ -30,17 +29,17 @@ Pluralisation and singularisation both take into account:

## Other String Functions

* `capitalise` capitalises the first character in a string: `test` becomes `Test`
* `capitalise()` capitalises the first character in a string: `test` becomes `Test`

* `camelCase` converts a given string to camelCase, with all non-alphanumeric characters stripped: `camel_case` becomes `camelCase`
* `camelCase()` converts a given string to camelCase, with all non-alphanumeric characters stripped: `camel_case` becomes `camelCase`

* `PascelCase` converts a given string to PascelCase, with all non-alphanumeric characters stripped: `pascal_case` becomes `PascelCase`
* `PascelCase()` converts a given string to PascelCase, with all non-alphanumeric characters stripped: `pascal_case` becomes `PascelCase`

* `variablise` converts a string to an underscore-separated list: `PascelCase` or `camelCase` becomes `camel_case`
* `variablise()` converts a string to an underscore-separated list: `PascelCase` or `camelCase` becomes `camel_case`

* `humanise` converts a string to a human-readable form: `PascelCase` or `CamelCase` becomes `Camel Case`
* `humanise()` converts a string to a human-readable form: `PascelCase` or `CamelCase` becomes `Camel Case`

* `pad` pads a given string with spaces.
* `pad()` pads a given string with spaces or other characters.

See `test/tests/InflectorTest.cfc` for how other strings are handled.

Expand Down

0 comments on commit 51605db

Please sign in to comment.