StringTokenizer - first string?
<p>I have this code to parse url string such as "?var=val"
but when "search" is just "var=val" this code fails, how to make just "var=val" work as well?</p>

<pre><code>    StringTokenizer st1 =
    new StringTokenizer(search, "?&amp;;");
    while(st1.hasMoreTokens()){
        String st2= st1.nextToken();

        int ii = st2.indexOf("=");
        if (ii &gt; 0) {
            int ib = st2.length();
            myparms.put( st2.substring(0,ii) , st2.substring(ii+1,ib) );
        }
    }
</code></pre>
