title: Get first few words of a String in dart
body: <p>How to get first few words (excerpts) from a long <code>String</code>. I have a big story type String and need to display the first 5-10 words on the screen and remaining to be displayed on the next screen. So is there any way to get so. I searched a lot but couldn't resolve the issue.
  Eg: TO get the first letter we use</p>
  <pre><code>String sentence = &quot;My single Sentence&quot;;
  sentence[0] //M
  </code></pre>
  <p>In the same way, I need to get some words.
  Eg:</p>
  <pre><code>String bigSentence ='''
  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book
  ''';
  //code to get the excerpt()
  
  //predicted output=&gt; Lorem Ipsum is simply dummy text...
  </code></pre>