i am working in flex 4.
i have one string variable name is str="we found six to thirteen years old self instruct in the connector in the violament "
if the str.length<50
i don't want to disturb the str variable.
if the str.length >50 then
i want to split the str into store two string variables for the following
fline="we found six to thirteen years old self instruct in the";
sline="connector in the violament "
Spliting is based on " " null charcter.
how i split programatically.
Use Regular Expression
Use lastIndexOf to find the last NULL in the string like:
fline= str.substring(0, str.lastIndexOf(" ", 50));
sline = str.substring(str.lastIndexOf(" ", 50) + 1);
Please rate answers.
> how i split programatically
Use the split() method of the String class.
Adobe Flex SDK Team
Thanks a lot