comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL_STRING.split vs strsplit
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
IDL_STRING.split vs strsplit [message #94765] Mon, 02 October 2017 03:11 Go to previous message
trisb is currently offline  trisb
Messages: 18
Registered: November 2010
Junior Member
Hi everyone,

I have the following string

mystring = "MY.NESTED.FILENAME.ARGH"

What I want to do is split the string into substrings with the dot as the dividing character. Two methods area available but only one delivers:

This works:

IDL> out = strsplit(mystring,'.',/extract)
IDL> help,out
OUT STRING = Array[4]
IDL> print,out
MY NESTED FILENAME ARGH


This doesn't:

IDL> out = mystring.split('.')
IDL> help,out
OUT STRING = Array[24]
IDL> print,out



Any clue as to why the second one behaves that way? Note that this only happens with the dot, so I must be missing something fundamental.

Thanks,
F.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: mystring.split('.') versus substring(mystring,'.',/extract)
Next Topic: new IDL version can only be downloaded by license administrators

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:22:04 PDT 2025

Total time taken to generate the page: 0.00449 seconds