Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 2
    taht is too late xD I also may be wrong but teh second could do harm for empty strings :( Commented May 28, 2010 at 15:02
  • 1
    Ehrm, charAt returns a char, does it not? So you should a) use == instead of .equals and b compare to '#' instead of "#". Commented May 28, 2010 at 15:03
  • @Johannes - yeah and thought I was so fast can't compete with him :-/. @sepp2k - yup was a typo fixed it right away you read fast :) Commented May 28, 2010 at 15:04