Adds limit_exact method which will limit a string and its custom ending to a specified length

Signed-off-by: Jason Walton <jwalton512@gmail.com>
This commit is contained in:
Jason Walton
2012-06-13 10:22:27 -07:00
parent b27b132128
commit e9e8a5b32e
2 changed files with 26 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ The **Str** class also provides three convenient methods for manipulating string
#### Limiting the number of characters in a string:
echo Str::limit($string, 10);
echo Str::limit_exact($string, 10);
#### Limiting the number of words in a string: