edits help

Richard Kreiss rkreiss at verizon.net
Thu May 26 12:40:14 PDT 2011


You could use n=strtok("'")

N will be the location of the first instance of '.  You could then test the
value of the next character(s). If it what you expect, use mid to replace
the ' with whatever character(s) you want.

 

Richard

 

From: Linda Gray [mailto:lc_gray at yahoo.com] 
Sent: Thursday, May 26, 2011 2:41 PM
To: Richard Kreiss; Jeff Harrison; filepro-list at lists.celestial.com
Subject: Re: edits help

 

toHTML doesn't work for '

 

  _____  

From: Richard Kreiss <rkreiss at verizon.net>
To: Jeff Harrison <jeffaharrison at yahoo.com>; Linda Gray <lc_gray at yahoo.com>;
filepro-list at lists.celestial.com
Sent: Thu, May 26, 2011 1:32:13 PM
Subject: RE: edits help



> -----Original Message-----
> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
> Behalf Of Jeff Harrison
> Sent: Thursday, May 26, 2011 2:27 PM
> To: Linda Gray; filepro-list at lists.celestial.com
> Subject: Re: edits help
> 
> ----- Original Message ----
> 
> > From: Linda Gray <lc_gray at yahoo.com>
> > To: Jay Ashworth <jra at baylink.com>; filepro-list at lists.celestial.com
> > Sent: Thu, May 26, 2011 1:13:21 PM
> > Subject: Re: edits help
> >
> > i'm not worried about the length of the end string.  i need to replace
the '
> > with an html friendly string like the toHTML command does, except it
> >doesn't do
> >
> > the single quote.  it was suggested that i do it with an  edit.
> >
> >
> >
> >
> > ________________________________
> > From: Jay Ashworth  <jra at baylink.com>
> > To: filepro-list at lists.celestial.com
> > Sent:  Thu, May 26, 2011 11:12:32 AM
> > Subject: Re: edits help
> >
> > ----- Original  Message -----
> > > From: "Linda Gray" <lc_gray at yahoo.com>
> >
> > > I need to  convert the ' to ' or %27 using an edit.
> > >
> > > I'm not good at  defining edits and sure would appreciate some help.
> > >
> > > I need to  replace the ' with it's HTML equivalent before writing
> > > out ajax script  that uses ' for strings and have names with ' in
them.
> >
> > So you need to  URLescape an ASCII string; that's your end goal?
> >
> > My snap reaction is "you  don't want to do that with an edit, because
> > you can't guarantee how many  characters you'll have to replace, and
> > you'll run out of space".  You  *probably* want to write code to do
> > that, as difficult as it is to handle  functions in filePro.
> >
> > Cheers,
> > -- jra
> > --
> > Jay R. Ashworth                  Baylink
jra at baylink.com
> > Designer                    The Things I Think                      RFC
2100
> > Ashworth & Associates    http://baylink.pitas.com        2000 Land Rover
DII
> > St Petersburg FL USA      http://photo.imageinc.us            +1 727
647
> 1274
> 
> 
> I would suggest that you NOT use an edit for this as well.  I don't think
edits
> work very well when you don't know how many of the "from" characters
> may appear in the string.
> 
> I would suggest doing this in processing - I think what you want to do is
> replace every occurance of chr("39") with "'" that is the "html
> equivalent".
> (not url escape - I assume that is not your goal)
> 
> Does filepro have a "replace" function?  I don't see one in 5.0 anyway.
Xlate
> seems to work on a character by character basis, so I don't think you can
use
> that.  I think you will need to write this using mid and instr.

SEE TOHTML()

Richard

> 
> I suppose Ken will now show us how to do this with an edit. :-)
> 
> Jeff Harrison
> jeffaharrison at yahoo.com
> Author of JHExport and JHImport
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20110526/195425bc/attachment.html 


More information about the Filepro-list mailing list