Property | Type | Description | |
---|---|---|---|
$blnMbstring | boolean | Efficiency: Is the MB String extension loaded? | |
$clean | array | Efficiency: Store strings once processed. |
Method | Description | |
---|---|---|
averageWordsPerSentence ( string $strText, string $strEncoding = '' ) : integer | float | Returns average words per sentence for text. | |
characterCount ( string $strText, string $strEncoding = '' ) : integer | Alias for textLength, as "letterCount", "wordCount" etc also used | |
cleanText ( string | boolean $strText ) : string | Trims, removes line breaks, multiple spaces and generally cleans text before processing. | |
letterCount ( string $strText, string $strEncoding = '' ) : integer | Gives letter count (ignores all non-letters). Tries mb_strlen and if that fails uses regular strlen. | |
lowerCase ( string $strText, string $strEncoding = '' ) : string | Converts string to lower case. Tries mb_strtolower and if that fails uses regular strtolower. | |
sentenceCount ( string $strText, string $strEncoding = '' ) : integer | Returns sentence count for text. | |
substring ( string $strText, integer $intStart, integer $intLength, string $strEncoding = '' ) : string | Gets portion of string. Tries mb_substr and if that fails uses regular substr. | |
textLength ( string $strText, string $strEncoding = '' ) : integer | Gives string length. Tries mb_strlen and if that fails uses regular strlen. | |
upperCase ( string $strText, string $strEncoding = '' ) : string | Converts string to upper case. Tries mb_strtoupper and if that fails uses regular strtoupper. | |
wordCount ( string $strText, string $strEncoding = '' ) : integer | Returns word count for text. |
protected static bool $blnMbstring | ||
return | boolean |
protected static array $clean | ||
return | array |