RTLable 越界错误
2016-07-20 本文已影响10人
LH_0811
command + f 搜索 int position 替换成下面的代码
int position = [data rangeOfString:delimiter options:NSCaseInsensitiveSearch range:NSMakeRange(last_position, [data length] - last_position)].location;
if (position != NSNotFound && position >= last_position)
{
if ([delimiter rangeOfString:@"<p"].location==0)
{
data = [data stringByReplacingOccurrencesOfString:delimiter withString:paragraphReplacement options:NSCaseInsensitiveSearch range:NSMakeRange(position, delimiter.length)];
}
else
{
data = [data stringByReplacingOccurrencesOfString:delimiter withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(position, delimiter.length)];
}
data = [data stringByReplacingOccurrencesOfString:@"<" withString:@"<"];
data = [data stringByReplacingOccurrencesOfString:@">" withString:@">"];
}