title: Ignoring the nth appearance of a letter
body: <p>I'm working on key columnar transposition cipher,</p>
  
  <pre><code>  for(int i = 0; i &lt; column; i++){
        position = keyWord.indexOf(sorted_key[i]);
    }
  </code></pre>
  
  <p>Keyword is: <code>analyst</code></p>
  
  <p>sorted_key is: <code>{a, a, l, n, s, t, y}</code></p>
  
  <p>For letter 'a' it will only see index 0 (the first appearance) and it will always ignore any other occurrence of the letter. How to fix that?
  I want it to see any other occurrence after the first one and so on</p>
  
  <p>Thanks</p>