Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #15663

Re: String Processing in JavaScript

Newsgroups comp.lang.javascript
Subject Re: String Processing in JavaScript
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <rgf248la5ap1dusauc9ek39jasff47mht4@4ax.com> <6os248lttein62omugahl5avvlpb18o8o2@4ax.com> <aadeqvFtm3U1@mid.individual.net> <0308485hn1uq91aj3vbpq0f8rsc21sa26r@4ax.com>
Message-ID <XnsA0C3BC406B44Aeejj99@194.109.133.133> (permalink)
Date 2012-09-03 16:30 +0000

Show all headers | View raw


Gene Wirchenko wrote on 03 sep 2012 in comp.lang.javascript:

>   If.  I think that I am safe with encodeURIComponent() on the
> user-entered values, but I need a guarantee that such an encoded value
> can never contain some character to be safe using String.split().  I
> have not seen anything about encodeURIComponent() that gives such a
> list.  Pointer, please, if you have one.

If you use a string as a split pointer, you can be reasonably sure it does 
not exist by accident in human readable text:

var arr = t.split('^^yyGrGr#~~#%');

However if you are free to specify the source split pointer, 
why not test for that character or string source side?


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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