Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript (http://www.flasher.ru/forum/forumdisplay.php?f=5)
-   -   split (http://www.flasher.ru/forum/showthread.php?t=39649)

Joey N. 15.11.2002 13:15

split
 
Простой вопрос: при разделении Stroke объекта splitом в какой массив, или лучше, как указать массив, который будет заполняться этими мелкими Stroчками?

Baltika 15.11.2002 13:23

stroka="a,b,c";
arr = stroka.split(',');
trace(arr[1]);

Joey N. 15.11.2002 13:28

И всего-то!? Блин, мог бы сам догадаться :)
Спасибо.

lexass 15.11.2002 13:55

Цитата:

Оригинал написал(а) Joey N.
И всего-то!? Блин, мог бы сам догадаться :)
Спасибо.

RTFM

String.split

Availability


Flash Player 5.

Usage


myString.split("delimiter", [limit])Parameters


delimiter The character or string at which myString splits. If the delimiter parameter is undefined, the entire string is placed in the first element of the array.

limit The number of items to place into the array. This parameter is optional.

Returns


An array containing the substrings of myString.

Description

...

myString = "Joe";
i = myString.split("");
trace (i);The Output window displays the following:

J, O, EIf the delimiter parameter is undefined, the entire string is placed into the first element of the returned array.

Example


The following example returns an array with five elements.

myString = "P, A, T, S, Y";
myString.split(",");


ЗЫ
и знание буржуйского тут непричем :p :cool:

Joey N. 16.11.2002 18:42

...мне надо больше времени уделять чтению хелпа... :)

Всем спасибо! вопрос исчерпан.


Часовой пояс GMT +4, время: 11:25.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.