wordLimit method
Get first N words
Implementation
String wordLimit(int wordCount) {
List<String> sentence = this.split(" ");
List<String> cropped = [];
if (sentence.length > wordCount) {
cropped.addAll(sentence.take(wordCount));
cropped.add('...');
return cropped.join(" ");
}
return this;
}