开发者

issue with StringByReplacingOccurrencesOfString options:NSCaseInsensitiveSearch

The options:NSCaseInsensitiveSearch is crashing my app when I have it in the following. Does anyone know why this might be?

NSString* string3 = [[[[tvQ.text stringByReplacingOccurrencesOfString:@"\n"
    withString:@" " options:NSCaseInsensitiveSearch range:wholeString]
        stringByReplacingOccurrencesOfString:@"&" withString:@"and"]     
            stringByReplacingOccurrencesOfString:@"ç" withString:@"c"] 
                stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];

Error from X-Code: error: 'wholeString' no开发者_StackOverflow中文版t defined


shouldn't your 'wholeString' be a string which you have to declare before the call of this function? or, if you want to search the whole string, then shouldn't it be your tvQ.text ?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜