I need to get portions of a string and assign to variables using (I think) the substring method. Where I'm a little fuzzy is how to use the string.length() method to obtain the parts before/after a character when the string's length is variable.
For example, I would like to :
String str = "zipcode=90210";
String cookiename = "zipcode";
String cookievalue = "90210";
In the above example, it would be fairly straight forward since I already know the length of the string before & after the "=". Since my app would need to support any cookie name and value, how would I go about capturing the entire strings before & after the "="?