Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1071 indexOf in combination with charAt does not work

You are here: irt.org | FAQ | JavaScript | Bugs | Q1071 [ previous next ]

Symptom: if (astring.indexOf(bstring.charAt(i)) !=-1) returns the index of the current bstring char in bstring instead of in astring.

Affects: Netscape 2.x

Workaround: ch = bstring.charAt(i); if (astring.indexOf(ch) !=-1) ...

©2018 Martin Webb