StringSplit and double-quotes issue

Discussion in 'Questions (Windows Mobile)' started by Cableguy, Jul 24, 2008.

  1. Cableguy

    Cableguy Expert Licensed User

    I guys...
    I'm starting a web project, and need to split the resulting string from the response string...
    My problem is that my split string is very specific, so it should return an arry of only 2 sub-strings...

    Code:
    Response.Value=Request.GetResponse
       Source=Response.GetString
       z = 
    Chr(34)
       SS = 
    "type=" & z & "hidden" & z & " name=" & z & "login" & z & " value=" & z
       a()= StrSplit(Source,SS)
    Instead, the split is being threted as blank (guessing), thus resulting in over 2000 sub-strings...

    WHY???
     
  2. agraham

    agraham Expert Licensed User

    Beacause each and every character in SS is treated as an individual separator. StrSplit does not treat SS as a string to search for, instead it regards it as a list of separators. Try using SubString instead.
     
  3. Cableguy

    Cableguy Expert Licensed User

    I didn't know that.. thanks Andrew...
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice