title: how to find all subwords of a string
body: <p>I'm trying to understand how to find all possible combination(sub strings) of a given string. i thought about an algorithm which works and its basically like this:</p>
  
  <p>Example: <code>"abc"</code></p>
  
  <ol>
  <li>Remove none - add <code>"abc"</code> to output </li>
  <li>Remove first char (<code>"bc"</code>) - add to output, then second (<code>"ac"</code>) - add to output, then remove third (<code>"ab"</code>) - add to output.</li>
  <li>Remove 2 chars (<code>"a"</code>, <code>"b"</code>, <code>"c"</code>) and add to output</li>
  </ol>
  
  <p>Now, I don't know how I'm going to write this so I am asking for a little help, nothing advanced as this is my hw and I want to learn and do it myself. More specifically I would like to know how to remove a char from the middle without changing the input.</p>
  
  <p>Also, <code>"cb"</code> isn't a sub-word for me beacuse all subwords needes to be in the smae order they are showed in the original string.</p>