Add algorithm for text ellipsis
Add test for ellipsize