Path: csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: string comparison fails? - Image1.jpg (0/1) Date: Sat, 17 Oct 2015 16:11:48 +0200 Organization: PointedEars Software (PES) Lines: 22 Message-ID: <2705941.Mo4q7LazKx@PointedEars.de> References: <08642bl9537lanf90ghcng1hefvuejcl20@4ax.com> <87io65pzlw.fsf@bsb.me.uk> <4114734.0R2ZEXP6cX@PointedEars.de> <877fmlpqdm.fsf@bsb.me.uk> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1445091108 31595 eJwNy8EBwCAIA8CVQEjAcajC/iPY+x+MyhNO0DGYvJYpMJ3qrlnj+6TIJ7OUVhHblWX9H2L3fRedENw= (17 Oct 2015 14:11:48 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sat, 17 Oct 2015 14:11:48 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwNwoERACEIA7CVXkqrrIPA/iO8lxBauttFOeeJgPku32K0iF6VBNyKFabm8m+u6H3fPImxkw4kNDo/KOMUvA== Cancel-Lock: sha1:ZCFyxAaROZ0fRFen4zaisT0x98k= X-NNTP-Posting-Host: eJwFwQERACAIA8BMHNuUOCDQP4L/dJnegShwuZcWtfR6yDZOzDl2U66GxW5NMZCIxnSLHyA0EXs= Xref: csiph.com comp.lang.javascript:28835 Ben Bacarisse wrote: > Thomas 'PointedEars' Lahn writes: >> Ben Bacarisse wrote: >>> joe writes: >>>> allte=apu2[i].substring(0,4); >>>> if (allte=="TTY") >>> >>> There's a big clue here. How can a 4 character string ever equal "TTY"? >> When it is only three characters long: "TTY".substring(0, 4) == "TTY". > […] >> That was easy. > > What was? It's certainly not an answer to my (rhetorical) question. It can be beneficial to read entire articles. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.