Re: StrSplit wont port to Windows? [message #29184] |
Thu, 07 February 2002 08:57 |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
> RA> Does anyone know why StrSplit will not port to
> RA> windows IDL.
>
> Are your trying to split a file path? The path separator is different
> between Windows and Unix. I can see no other reason why it should not
> work under Windows.
>
> - Carsten
Like Carsten said, if you are splitting a path, try something like so:
parameter_file = 'C:\my\path\to\file.txt'
parts = strsplit(parameter_file, '\:/', /extract)
It should parse your file paths on Unix, windows and I think Mac. You
probably just have to change '/' to '\:/'.
-Rick
|
|
|
|
|