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

Home » Public Forums » archive » removing substring from string array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
removing substring from string array [message #53240] Mon, 02 April 2007 14:21 Go to previous message
rchughes is currently offline  rchughes
Messages: 26
Registered: April 2006
Junior Member
Hi All,

Does anyone know a quick way to remove the same prefix from all
elements in a string array?

Here is an example:
start with string_array = ['dog.spot', 'dog.rover', 'dog.lucky']

and get ['spot', 'rover', 'lucky']

The only way I know I can do this is with a FOR loop and the
STRSPLIT(string_array[i], '.', /EXTRACT) command. I am hoping someone
could help me out with a much more efficient way if there is one.

Thanks in advance,
Ryan.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: rotate and transpose images in xobjviewer
Next Topic: General help

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

Current Time: Wed Oct 08 17:38:01 PDT 2025

Total time taken to generate the page: 0.00542 seconds