开发者

parsing array elements in iPhone

Merged with parsing array elements in iPhone.
    NSBundle *bundle = [NSBundle mainBundle];
    NSString *pthpath = [bundle pathForResource:@"path" ofType:@"txt"];
    NSString *content = [NSString stringWithContentsOfFile:pthpath encoding:NSUTF8StringEncoding error:nil];
    array=[[NSArray alloc ]init];
    array = [content componentsSeparatedByString:@"@"];
=====================================================================

here content is 87,348~51,347~135,132~182,133~268,346~236,347~159,168~87,347@118,298~115,297~200,298~189,266~128,265~117,299@222,352~268,353~264,340~219,342~225,355@186,262~199,2开发者_运维百科99~212,297~195,257~188,260

and array is ARRAY (

"87,348~51,347~135,132~182,133~268,346~236,347~159,168~87,347", "118,298~115,297~200,298~189,266~128,265~117,299",

"222,352~268,353~264,340~219,342~225,355",

"186,262~199,299~212,297~195,257~188,260"

But I want to again create an array by parsing with ~ .Please help me outt...........

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜