hi
try this i m not sure whether it will help u
var fline:String ="we found six to thirteen years old self instruct in
the connector in the violament "
var sline:String = ''
if(fline.length>50)
{
var arr = fline.split(' ');
var sHalfCount = arr.length - Math.floor(arr.length/2)
fline = ''
for(var i=0;i<arr.length;++i)
{
if(i < sHalfCount)
{
fline += arr[i]+' '
}
else
{
sline += arr[i]+' '
}
}
}
trace('fline = '+fline)
trace('sline = '+sline)
BOF
On Nov 10, 11:18 am, athi <[email protected]> wrote:
> hi
> 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.
>
> But
> 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.
>
> regards
> athi
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.