AOL Interview Question

How would you write an algorithm to truncate text, accounting for spaces and punctuation?