Utilities for string
David Hsing
Returns a string that abbreviates the given text using placeholder
Optional
The text to inspect
The max width of the expected string
The placeholder to append
a string that abbreviates the given text using placeholder
abbreviate('foobar', -1); // 'foobar'abbreviate('foobar', 0); // ''abbreviate('foobar', 5); // 'fo...'abbreviate('foobar', 6); // 'foobar'abbreviate('foobar', 10); // 'foobar' Copy
abbreviate('foobar', -1); // 'foobar'abbreviate('foobar', 0); // ''abbreviate('foobar', 5); // 'fo...'abbreviate('foobar', 6); // 'foobar'abbreviate('foobar', 10); // 'foobar'
Utilities for string
Author
David Hsing