Re: strjoin - IDL 4 dummies [message #46369] |
Tue, 15 November 2005 09:14 |
savoie
Messages: 68 Registered: September 1996
|
Member |
|
|
"Liberum" <shejo284@gmail.com> writes:
> Hi
>
> Having a problem with strjoin when doing the following:
> s = strjoin(["some_path_to_files", exp, date, '*h5'],"/",/single)
> IDL prints:
> STRING
> /data/proj/safworks/sheldon/MSG_PPS_COMP/data/pps/cloudmask/
> 200412/*hdf
>
I'd be most concerned that IDL is apparently changing the '*h5' into '*hdf'.
Barring that's not a problem, look at strcompress(string, /remove_all)
Matt
|
|
|
|
Re: strjoin - IDL 4 dummies [message #46375 is a reply to message #46374] |
Tue, 15 November 2005 07:15  |
Robert Moss
Messages: 74 Registered: February 1996
|
Member |
|
|
Liberum wrote:
> Hi
>
> Having a problem with strjoin when doing the following:
>
> date = string(date)
> print, size(date,/tname)
> s = strjoin(["some_path_to_files", exp, date, '*h5'],"/",/single)
> print, s
> where date exp is already a string.
> IDL prints:
>
> STRING
> /data/proj/safworks/sheldon/MSG_PPS_COMP/data/pps/cloudmask/
> 200412/*hdf
>
> Now, it is this space that I cannot get rid of. I am certain that
> everything element in the list are strings but this space still shows
> up.
>
> Any help is greatly appreciated,
> Lib
>
I cannot see the space in your post, but I am guessing it is just before
the date. Try this
date = strtrim( date, 2 )
This will remove leading and trailing spaces, which string() does not.
--
Robert Moss, PhD
|
|
|