从给定的字符串中获取字符串

Get the string from the given string

我想从这个 NSString

中获取 '\' 之后的字符串值
   NSString *text = @"\"jkhfjkhfds" ;

我该怎么做?

@madhev 试试这个..

NSString *text = @"\"jkhfjkhfds";
    NSArray *arrSeparate = [text componentsSeparatedByString:@"\""];
    NSLog(@"result = %@",[arrSeparate objectAtIndex:1]);
NSString *text = @"\"jkhfjkhfds" ;  
text = [text stringByReplacingOccurrencesOfString:@"\" withString:@""];  
text= [text stringByReplacingOccurrencesOfString:@"\"" withString:@""];  
NSLOg( NSLog(@"result = %@",text)`;`