string manipulation question

Fairlight fairlite at fairlite.com
Fri Dec 10 21:18:58 PST 2004


Is it just me, or did Kenneth Brody say:
> Tony Ryder wrote:
> [...]
> > > As long as you don't want to computer two quotes into four, use the
> > > following edit:
> > > 
> > >     { {!" "!}@ | "'"<"'"> | * }
> > > 
> > > This will convert one single-quote into two, and it will leave two
> > > single-quotes as two.
> > 
> > I do not understand what the @ sign does in this edit.
> 
> It matches EOF, so that only trailing spaces are deleted.  Otherwise, all
> spaces within the field would be removed.
> 
> Question to ponder:
> 
>     Why does the edit fail if the data has any single quotes, and you don't
>     strip trailing spaces?

SWAG here--only thing I can think of:

Field Length: 20 (pipe shows position right after end of the field)

that's all folks    |
that''s all folks    |  (overflow of 1)

Okay, so if you don't do a trim of the spaces, any trailing space might
overflow the field length, thus failing the edit?

IF this is a correct surmisal (and I'm -not- at all sure it is--it's the
only thing I could think of), then might I ask what happens in the
following case?

abcdefghijk'lmnopqrs|
abcdefghijk''lmnopqrs|

Will the edit fail, or will the 's' be chopped?

mark->
-- 
Bring the web-enabling power of OneGate to -your- filePro applications today!

Try the live filePro-based, OneGate-enabled demo at the following URL:
               http://www2.onnik.com/~fairlite/flfssindex.html


More information about the Filepro-list mailing list