Snipe.Net Geeky, sweary things.

Tagsnippets

Truncate text to x number of words

T

This code will truncate given text to a certain length, adding “…” where it’s been truncated. For example: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque ac urna a erat pharetra placerat. Sed at tortor id lacus pellentesque malesuada. Suspendisse vitae dui vel velit tincidunt aliquet. Cras condimentum lobortis leo. Integer semper. Nunc semper felis a...

Snipe.Net Geeky, sweary things.

About Me

I'm a tech nerd from NY/CA now living in Lisbon, Portugal. I run Grokability, Inc, and run several open source projects, including Snipe-IT Asset Management. Tweet at me @snipeyhead, skeet me at @snipe.lol, or read more...

Get in Touch