Class yii\helpers\StringHelper
Inheritance | yii\helpers\StringHelper » yii\helpers\BaseStringHelper |
---|---|
Available since version | 2.0 |
Source Code | https://github.com/yiisoft/yii2/blob/master/framework/helpers/StringHelper.php |
StringHelper
Public Methods
Method | Description | Defined By |
---|---|---|
base64UrlDecode() | Decodes "Base 64 Encoding with URL and Filename Safe Alphabet" (RFC 4648) | yii\helpers\BaseStringHelper |
base64UrlEncode() | Encodes string into "Base 64 Encoding with URL and Filename Safe Alphabet" (RFC 4648) | yii\helpers\BaseStringHelper |
basename() | Returns the trailing name component of a path. | yii\helpers\BaseStringHelper |
byteLength() | Returns the number of bytes in the given string. | yii\helpers\BaseStringHelper |
byteSubstr() | Returns the portion of string specified by the start and length parameters. | yii\helpers\BaseStringHelper |
countWords() | Counts words in a string | yii\helpers\BaseStringHelper |
dirname() | Returns parent directory's path. | yii\helpers\BaseStringHelper |
endsWith() | Check if given string ends with specified substring. | yii\helpers\BaseStringHelper |
explode() | Explodes string into array, optionally trims values and skips empty ones | yii\helpers\BaseStringHelper |
normalizeNumber() | Returns string represenation of number value with replaced commas to dots, if decimal point of current locale is comma | yii\helpers\BaseStringHelper |
startsWith() | Check if given string starts with specified substring. | yii\helpers\BaseStringHelper |
truncate() | Truncates a string to the number of characters specified. | yii\helpers\BaseStringHelper |
truncateWords() | Truncates a string to the number of words specified. | yii\helpers\BaseStringHelper |
Protected Methods
Method | Description | Defined By |
---|---|---|
truncateHtml() | Truncate a string while preserving the HTML. | yii\helpers\BaseStringHelper |