1.遇到问题,或者不熟悉的api,首先要去看官方文档,然后再去百度搜索。这样比乱搜效率更高。
2. range of string : Finds and returns the range of the First Occurrence of a given string within the receiver.
Return Value
An NSRange
structure giving the location and length in the receiver of the first occurrence of aString
. Returns {
NSNotFound
, 0}
if aString
is not found or is empty (@""
).