Skip to content

Small utility to adaptively cut long description for short previews.

Notifications You must be signed in to change notification settings

lamp-of-god/text-cutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

text-cutter

Small utility to adaptively cut long description for short previews.

Usage

Firstly, create an instance of TextCutter class and specify cutting method and type of text decoration like this:

$textCutter = new TextCutter(TextCutter::METHOD_WHOLE_WORDS, TextCutter::DECORATION_ELLIPSIS);

Now you can use $textCutter->cut($text, $length) method to cut your text!

About

Small utility to adaptively cut long description for short previews.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages