StringHelper
API reference › yii › helpers › StringHelper
StringHelper.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
base64UrlDecode() static | Decodes “Base 64 Encoding with URL and Filename Safe Alphabet” (RFC 4648). | BaseStringHelper |
base64UrlEncode() static | Encodes string into “Base 64 Encoding with URL and Filename Safe Alphabet” (RFC 4648). | BaseStringHelper |
basename() static | Returns the trailing name component of a path. | BaseStringHelper |
byteLength() static | Returns the number of bytes in the given string. | BaseStringHelper |
byteSubstr() static | Returns the portion of string specified by the start and length parameters. | BaseStringHelper |
convertIniSizeToBytes() static | Converts php.ini style size to bytes. | BaseStringHelper |
countWords() static | Counts words in a string. | BaseStringHelper |
dirname() static | Returns parent directory’s path. | BaseStringHelper |
endsWith() static | Check if given string ends with specified substring. Binary and multibyte safe. | BaseStringHelper |
explode() static | Explodes string into array, optionally trims values and skips empty ones. | BaseStringHelper |
findBetween() static | Returns the portion of the string that lies between the first occurrence of the start string and the last occurrence of the end string after that. | BaseStringHelper |
floatToString() static | Safely casts a float to string independent of the current locale. | BaseStringHelper |
mask() static | Masks a portion of a string with a repeated character. | BaseStringHelper |
matchWildcard() static | Checks if the passed string would match the given shell wildcard pattern. | BaseStringHelper |
mb_ucfirst() static | This method provides a unicode-safe implementation of built-in PHP function ucfirst(). | BaseStringHelper |
mb_ucwords() static | This method provides a unicode-safe implementation of built-in PHP function ucwords(). | BaseStringHelper |
normalizeNumber() static | Returns string representation of number value with replaced commas to dots, if decimal point of current locale is comma. | BaseStringHelper |
startsWith() static | Check if given string starts with specified substring. Binary and multibyte safe. | BaseStringHelper |
truncate() static | Truncates a string to the number of characters specified. | BaseStringHelper |
truncateWords() static | Truncates a string to the number of words specified. | BaseStringHelper |
truncateHtml() protected static | Truncate a string while preserving the HTML. | BaseStringHelper |