title: Best way to parse AlphaNumeric string, parts of which will be converted to Int, Bool, String
body: <p>I have a schema according to which AlphaNumeric string of specific length will be interpreted. For example, index 0-12 interpret as <code>string</code>, 13-20 interpreted as <code>Int</code>, 21-22 as <code>Bool</code> and so on.
  So far, I have a linked list that is formed at runtime, where each element(<code>struct</code>) has two fields: length and type(<code>enum</code>). By iterating through the list and checking which type the element belongs to, correct conversion is performed.<br>
  It seems like my method very inefficient and error prone to this task. Is there a better way to do this ?</p>