solve/inflector

- [ Inflector ] class for string manipulating

v1.0.7 2016-03-06 15:35 UTC

This package is auto-updated.

Last update: 2024-10-27 00:43:26 UTC


README

v1.0.1

This class allows you to solve different word-related tasks.

Methods available at the current version

Inflector::transliterate($text, $direction = "en");
Inflector::slugify($text, $slugChar = '-');
Inflector::underscore($text);
Inflector::camelize($text);
Inflector::pluralize($text);
Inflector::singularize($text);
Inflector::priceToStringLong($price, $keepFloat = true, $currency = "uah", $language = null);
Inflector::priceToStringShort($price, $keepFloat = true, $currencyShortLabel = 'грн.', $language = null);

For the last two methods you can use a method to define default language:

Inflector::setDefaultLanguage($language)