Skip to content

Instantly share code, notes, and snippets.

@laurentperroteau
Created September 4, 2014 15:07
Show Gist options
  • Save laurentperroteau/8f03b52fdb80345e4e8a to your computer and use it in GitHub Desktop.
Save laurentperroteau/8f03b52fdb80345e4e8a to your computer and use it in GitHub Desktop.
Cut string after x characters and add "..."
newString = oldString.substr(0,35) + ' [...] ';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment