solve / 屈折词
- [ 屈折词 ] 类用于字符串处理
v1.0.7
2016-03-06 15:35 UTC
Requires
- php: >=5.3.0
README
v1.0.1
此类允许您解决与单词相关的一系列任务。
当前版本可用的方法
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);
对于最后两个方法,您可以使用方法来定义默认语言
Inflector::setDefaultLanguage($language)