简体   繁体   中英

Nsrange problem when it should return 0

因此,我尝试在nsstring中搜索一个名为rangeFromString的术语,但是只要没有与该结果匹配的内容,我都会得到2748601949而不是0的信息。例如,尝试定位@“ sin (“,@” cos(“和@” tan(“以@” 1 + sin(28)+ cos(72)“之类的字符串表示。谢谢

它返回NSNotFound ,它在NSObjCRuntime.h定义如下:

enum {NSNotFound = NSIntegerMax};

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM