string.split method

string.split method

Post by Andrey Revyaki » Thu, 25 Jan 2001 13:03:06



Quick question: is the string.split method supposed to work in FLASH 5?
I always get an array consisting of the initial string and nothing else,
even though I know for sure the element which splitting should occur at
is there.
Andrey.

--
http://morgan.rutgers.edu
http://www.xcskihighpoint.com
http://mbclserver.rutgers.edu/morgan/SequenceFormatter.html

 
 
 

string.split method

Post by John Dowdel » Thu, 25 Jan 2001 13:54:46


Yes, other people use it. Got sample query, so we can share some experience
here?

(ie, does it never-ever work for you as for others, or are you looking at
one particular case, and if so what is it, etc)

Regards,
John Dowdell
Macromedia Tech Support

 
 
 

string.split method

Post by Andrey Revyaki » Thu, 25 Jan 2001 14:17:11


Well, the task is really easy. I have a string, let's say

myString = "ttctcatgtttgacagcttatcatcgaattcctttaatgcggtagtttatcacagttaaa";

(it's a DNA sequence, BTW) and there is a "gaattc" sequence in the middle. I
need to split it into two at the "gaattc" position

products = myString.split("gaattc);

The products array which get always consists only of the original myString
sequence.

Andrey.


> Yes, other people use it. Got sample query, so we can share some experience
> here?

> (ie, does it never-ever work for you as for others, or are you looking at
> one particular case, and if so what is it, etc)

> Regards,
> John Dowdell
> Macromedia Tech Support

--
http://morgan.rutgers.edu
http://www.xcskihighpoint.com
http://mbclserver.rutgers.edu/morgan/SequenceFormatter.html
 
 
 

string.split method

Post by Byron Canfiel » Thu, 25 Jan 2001 15:12:17


There is an error in the manual that states that using String.split on a
string and not declaring any delimiter will separate the string into and
array of the individual characters in the original string. It does not work.

But supplying a delimiter works just fine, provided there are any of the
delimiter characters in the string.

--
Byron Canfield, Macromedia Evangelist
Canfield Studios: http://www.byronc.com


Quote:> Quick question: is the string.split method supposed to work in FLASH 5?
> I always get an array consisting of the initial string and nothing else,
> even though I know for sure the element which splitting should occur at
> is there.

 
 
 

1. split method causing the run slowly error message

Hi there,

I have a function that uses the split method to fill an array that looks
like this:

function fillLatRoots()
{
     trace( "inside fillLatRoots" ) ;
     latRoots = lvok.split( "|" ) ;

When the number of elements to populate the array is small enough it
runs fine. With a lot of elements, though, the error message about a
script causing the Player to run slowly appears when the Player is in
the function.  Checked out the tech note
http://www.macromedia.com/support/flash/ts/documents/script_loop.htm
about this error message.

Since there's not a loop going on here in the ActionScript (maybe behind
the sceens?), I'm not sure how to use a frame loop to refresh the stage,
as suggested in the tech note.

Any hints?

Thanks a bunch,
Pauline

2. Preloader - what a nightmare...

3. JavaScript Split Method w/Array Question

4. CORRUPTED VIDEO IN PROGRAM MONITOR-WIN XP

5. string.split()

6. control quicktime or windows media movies with scripts?

7. Flash string split function, fast even for large strings

8. how to replace black in clipping path

9. HELP!! String.split

10. base pair split from String ?

11. string split faster?

12. how to use the string.split function in flash5

13. What exactly does string.split do??