finding ' symbol

closed account (oEwqX9L8)
I'm writing a bit of code that needs to determine if a char variable is an apostrophe ('). My code doesn't seem to recognize it though. Does using the escape character mess up my comparison?

1
2
3
  if (symbol == '\'') {
    //call function
  }


thanks for any help!
Nothing is wrong here from the first glance.
Can you post your full code?
closed account (48T7M4Gy)
Does using the escape character mess up my comparison?


Why not just try it with a couple of lines of code and satisfy yourself it works as you expect under test? :)
closed account (oEwqX9L8)
thanks for the help!
Topic archived. No new replies allowed.