Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #15660
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: String Processing in JavaScript |
| Date | 2012-09-02 17:56 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <fpv7489553clab2ahrdate5rrs9m7lndri@4ax.com> (permalink) |
| References | <rgf248la5ap1dusauc9ek39jasff47mht4@4ax.com> <Eyd0s.130221$lB3.128385@fx23.am4> |
On Sat, 01 Sep 2012 02:30:10 +0100, Mike Winter
<usenet@michael-winter.me.invalid> wrote:
>On 31/08/2012 23:56, Gene Wirchenko wrote:
>
>[snip]
>
>> I have to delete because of how String.indexOf() works. It does
>> not have a string start point.
>
>Yes it does. The String.prototype.indexOf method has a second, optional
>argument that specifies the position (zero-based, inclusive) from which
>the search begins. The same applies to String.prototype.lastIndexOf
>except that the default start is obviously the string length (the end)
>rather than 0.
Somehow, I missed that. Maybe, a dodgy site.
Thank you.
>For what it's worth, you can't actually delete characters from a string.
>Strings are immutable and any changes are separate, modified copies
>(with all the performance implications that may bring).
At the abstract level I am operating at, yes, you can. The
implementation details do not matter so much to me as long as I get
reasonable performance. That stated, I do prefer to not change things
if I need not. It tends to be faster, and lets me ignore more of the
things under the hood.
Sincerely,
Gene Wirchenko
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
String Processing in JavaScript Gene Wirchenko <genew@ocis.net> - 2012-08-31 15:56 -0700
Re: String Processing in JavaScript Mike Winter <usenet@michael-winter.me.invalid> - 2012-09-01 02:30 +0100
Re: String Processing in JavaScript Gene Wirchenko <genew@ocis.net> - 2012-09-02 17:56 -0700
Re: String Processing in JavaScript Jim T. <x@y.z> - 2012-08-31 22:30 -0400
Re: String Processing in JavaScript "Mel Smith" <med_cutout_syntel@aol.com> - 2012-08-31 21:47 -0600
Re: String Processing in JavaScript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-09-01 08:51 +0000
Re: String Processing in JavaScript "Mel Smith" <med_cutout_syntel@aol.com> - 2012-09-01 08:38 -0600
Re: String Processing in JavaScript Gene Wirchenko <genew@ocis.net> - 2012-09-02 18:04 -0700
Re: String Processing in JavaScript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-09-03 16:30 +0000
Re: String Processing in JavaScript Mike Winter <usenet@michael-winter.me.invalid> - 2012-09-03 21:23 +0100
Re: String Processing in JavaScript Gene Wirchenko <genew@ocis.net> - 2012-09-03 14:26 -0700
Re: String Processing in JavaScript Stefan Weiss <krewecherl@gmail.com> - 2012-09-03 19:29 +0200
Re: String Processing in JavaScript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-09-03 21:45 +0200
Re: String Processing in JavaScript Gene Wirchenko <genew@ocis.net> - 2012-09-03 14:27 -0700
Re: String Processing in JavaScript Stefan Weiss <krewecherl@gmail.com> - 2012-09-04 00:48 +0200
Re: String Processing in JavaScript Gene Wirchenko <genew@ocis.net> - 2012-09-03 17:20 -0700
Re: String Processing in JavaScript Tim Streater <timstreater@greenbee.net> - 2012-09-04 10:06 +0100
Re: String Processing in JavaScript Ross McKay <au.org.zeta.at.rosko@invalid.invalid> - 2012-09-04 20:02 +1000
Re: String Processing in JavaScript Gene Wirchenko <genew@ocis.net> - 2012-09-04 08:47 -0700
csiph-web