solve/屈折词

- [ 屈折词 ] 类用于字符串处理

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

This package is auto-updated.

Last update: 2024-08-27 00:18:40 UTC


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)