2
NSRange range = [string rangeOfString: substring]
그래서 난 [array objectAtIndex:index]
이 인덱스를 작성할 수 NSUInteger index
에서 추출하는? 그 문자열은 해당 문자열의 길의 시작에서 발견되는 경우
NSRange range = [string rangeOfString: substring]
그래서 난 [array objectAtIndex:index]
이 인덱스를 작성할 수 NSUInteger index
에서 추출하는? 그 문자열은 해당 문자열의 길의 시작에서 발견되는 경우
// make sure that the substring was actually found:
NSRange result = [string rangeOfString:substring];
if (result.location != NSNotFound)
{
// make sure that the index exists in the array
if (result.location < [array count])
{
id someObj = [array objectAtIndex:result.location];
// do something cool with someObj here
}
}
NSRange range = [string rangeOfString:substring];
NSUInteger index = range.location;
//...
range.location는 정말 큰 수를 반환합니다. 왜 이런거야? – coolcool1994
@ coolcool1994 이유를 찾았습니까? 나는 똑같은 문제를 겪고있다. – hoangpx