StringSplit and double-quotes issue

Cableguy

Expert
Licensed User
Longtime 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...

B4X:
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???
 

Cableguy

Expert
Licensed User
Longtime 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.

I didn't know that.. thanks Andrew...
 
Top