| Title: | -={ H A C K E R S }=- |
| Notice: | Write locked - see NOTED::HACKERS |
| Moderator: | DIEHRD::MORRIS |
| Created: | Thu Feb 20 1986 |
| Last Modified: | Mon Aug 03 1992 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 680 |
| Total number of notes: | 5456 |
f$edit ( src_str,"TRIM")
removes LEADING and trailing spaces.
I see nothing in the lexical doc for removing trailing only??
Any suggestions?
Thanks
Dan
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 477.1 | Brute Force? | COOKIE::KRANTZ | Thu May 21 1987 15:40 | 4 | |
attach a leading nonblank char (say a '*'), trim the string
and then remove the '*'? Not pretty, but not difficult...
Joe
| |||||
| 477.2 | prepend an x, trim, remove the x | VIDEO::OSMAN | type video::user$7:[osman]eric.six | Fri May 22 1987 09:25 | 11 |
How about
$ str = " some leading and trailing spaces "
$ write sys$output f$edit ("x"+str,"trim")-"x"
Kind of silly but it works. For those of you that don't understand
gobbldigook yet, this means, put a letter "x" at the beginning, then
trim leading and trailing spaces, of which there will are only trailing,
then take off the protective "x".
/Eric
| |||||
| 477.3 | Thanks | DREAMN::LORADITCH | Seems like the nothing, never was | Tue May 26 1987 16:34 | 6 |
Thanks, definitely not the prettiest, brute force never is.
But it will do the trick.
Dan
| |||||