Skip to content

Instantly share code, notes, and snippets.

@chriswrightdesign
Created November 16, 2013 05:30
Show Gist options
  • Save chriswrightdesign/7496358 to your computer and use it in GitHub Desktop.
Save chriswrightdesign/7496358 to your computer and use it in GitHub Desktop.
Trunicate long text
if (myText.length > 145) {
myText = myText.substring(0, 140) + "..."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment