HP3000-L Archives

August 1999, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Paul H. Christidis" <[log in to unmask]>
Reply To:
Date:
Thu, 26 Aug 1999 00:09:00 -0700
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (36 lines)
How about the following:

setvar a ' this   is    small      test  '
    while pos("  ",a) <> 0 do
      setvar a REPL(a,"  "," ")
endwhile
setvar a LTRIM(RTRIM(a))
showvar a

Regards
Paul H. Christidis

____________________Reply Separator____________________
Subject:    ci programming question
Author: [log in to unmask]
Date:       8/24/99 3:40 PM

hi all!

i've got a little puzzler....  i've got a ci string variable
that contains, depending on it's input value, 'n' words
(where 'n' is >= 2 and < some reasonable number) separated
by 'x' spaces (where 'x' is >= 1 and < some finite yet
practical number).  i'd like to reduce it to a string that
would still contain 'n' words but where each word is
separated by one space.  'repl' isn't exactly working....
i'd rather not take the 'word' route since i'm unsure how
many words are in the entire string.  any
ideas?                  - d

--
Donna Garverick     Sr. System Programmer
925-210-6631        [log in to unmask]

>>>MY opinions, not Longs Drug Stores'<<<

ATOM RSS1 RSS2