string-007
v1.0.0
Published
A couple of functions for handling strings
Downloads
1
Readme
Introduction
These are series of use string functions that I happened to use a lot.
Format text
Transform text to title
title("heLLo"); //"Hello"
title("Hello"); //"Hello"
title("HELLO"); //"Hello"
title("hELLO"); //"Hello"
Truncate text
Shorten a text
truncate("12345678901234567890"); //"12345678901234..."
truncate("1234567890"); //"1234567890"
truncate("123456789012345678901234567890", 20); // "12345678901234567890..."
truncate("123456789012345678901234567890", 20, ">>>"); // "12345678901234567890>>>"