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

Home » Public Forums » archive » strsplit vectorized
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: strsplit vectorized [message #85839 is a reply to message #85837] Fri, 13 September 2013 06:34 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Thursday, September 12, 2013 3:50:54 PM UTC-4, John Correira wrote:

>
> For a IDL 7 compatible answer, if the data always in that format (i.e.
>
> YYYY-MM-DD HH:MM:SS) you could do something like
>
>
>
> new = STRJOIN(strmid(array,[0,5,8,11,14,17],[4,2,2,2,2,2]))

Nice. I had previously complained about the clumsy syntax of STRMID when you just want to a single substring from each element of a string array. (You can't use a scalar to specify the first position or string length -- http://www.idlcoyote.com/code_tips/strmidvec.html ) But when you want to extract multiple substrings from each element of a string array then the syntax becomes elegant.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Inverse hyperbolics?
Next Topic: generating sequences

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

Current Time: Wed Oct 08 15:31:57 PDT 2025

Total time taken to generate the page: 0.00474 seconds