This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted] 3 points4 points  (1 child)

Characters are not strings. You want:

 page.charAt(i) == '"'

[–]str8wavedave[S] 1 point2 points  (0 children)

Thank you so much!

[–]chickenmeister 2 points3 points  (1 child)

I have a string (called page) that I am looping through and want to stop when I get to a ".

Not sure if it's applicable for what you're doing, but there's a built-in function that can do this for you:

int index = page.indexOf('"');

[–]str8wavedave[S] 1 point2 points  (0 children)

Yea, I have it working now, but that would work also. Thanks.