Created
November 10, 2012 13:18
-
-
Save tomasfejfar/4051035 to your computer and use it in GitHub Desktop.
Truncating text, keeping full sentences
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text = "Were you born 1. 3. 1987 in Prague? Štěpán Jr. lives there for 3 years now! " | |
expectedResult = "Were you born 1. 3. 1987 in Prague?" | |
trimText(input = text, characterLimit = 50) == expectedResult |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment