Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!TARDIS.CRAY.COM!cargo From: cargo@TARDIS.CRAY.COM (David S. Cargo) Newsgroups: comp.lang.icon Subject: concat with blank and a question Message-ID: <9001191439.AA00765@zk.cray.com> Date: 19 Jan 90 14:39:35 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 25 I recently purchased a product called HyperPAD for the PC. It is intended to be a HyperCard-like product for the PC. What I found interesting was something in its list of operators. To concatenate two strings there is the concatenation operator &. However, there is an operator to concatenate two strings with a space in between them, the && operator. I realized that this one little feature was a a nice convenience. I know I have often used something like a || " " || b because I needed to put a space between two strings I was combining. Maybe from an overall language viewpoint this isn't a significant improvement, but I thought it was an interesting addition to a language with string processing. The question I have is: What is the best way to elminate spaces (or, to generalize, members of a particular cset) from a string while still preserving the order of the remaining characters? I'm going to be performing some comparisons where certain characters are very likely to not be significant. I'm looking for an efficient way of doing preprocessing to remove the insignificant characters. o o \_____/ /-o-o-\ _______ DDDD SSSS CCCC / ^ \ /\\\\\\\\ D D S C \ \___/ / /\ ___ \ D D SSS C \_ _/ /\ /\\\\ \ D D S C \ \__/\ /\ @_/ / DDDDavid SSSS. CCCCargo \____\____\______/ CARGO@TARDIS.CRAY.COM