title: Parsing QR returned string in java
body: <p>I am reading QR through camera and returning the string which that QR returns.
  I am parsing that string to decode that value. Please look at the code and sample input and output data.</p>
  
  <p>Code:</p>
  
  <pre><code>public void decodeQRString()
  {
      String alphaNumeric = "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
      String str = "0F123456789ABCDEF1OABERCROMBIE SUBWAY SHOP241234";
      int n = str.length(), i = 0;
  
      while(i &lt; n)
      {
          StringBuilder tmp = new StringBuilder();
  
          int len = alphaNumeric.indexOf(str.charAt(i+1)) + 1;
  
          int l = len + 1;
          for(int j = 2; j &lt;= l; j++)
          {
              tmp.append(str.charAt(i+j));
          }
          System.out.println(str.charAt(i) + ":" + str.charAt(i+1) + ":" + tmp.toString());
          i = (i+2) + len;
      }
  }
  </code></pre>
  
  <p>Required Output:</p>
  
  <pre><code>0:F:123456789ABCDEF
  
  1:O:ABERCROMBIE SUBWAY SHOP
  
  2:4:1234
  </code></pre>
  
  <p>My Output:</p>
  
  <pre><code>0:F:123456789ABCDEF
  
  1:O:ABERCROMBIE SUBWAY SHOP2
  
  4:1:2
  </code></pre>
  
  <p>Please help me solve this problem.</p>