加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

使用正则表达式导入RegexKitLite.m出现警告的问题

发布时间:2020-12-14 01:24:16 所属栏目:百科 来源:网络整理
导读:转载自:http://www.cocoachina.com/bbs/read.php?tid-115146.html 我这里需要判断手机号码,qq号码,邮箱等的规范,所以需要用到正则表达式,导入RegexKitLite.h之后就出现了警告 ? 1 2 3 id functionString = [exception objectForKey:@ "function" ],fileS

转载自:http://www.cocoachina.com/bbs/read.php?tid-115146.html


我这里需要判断手机号码,qq号码,邮箱等的规范,所以需要用到正则表达式,导入RegexKitLite.h之后就出现了警告

?
1
2
3
id functionString = [exception objectForKey:@ "function" ],fileString = [exception objectForKey:@ "file" "description" "line" ];
RKLCHardAbortAssert((functionString != NULL ) && (fileString != ) && (descriptionString != ) && (lineNumber != ));
[[ NSAssertionHandler currentHandler] handleFailureInFunction:functionString file:fileString lineNumber:( NSInteger )[lineNumber longValue] description:descriptionString];


这就是出现警告的地方, Format string is not a string literal (potentially insecure)
这里该怎么修改才可以去掉警告呢


description:descriptionString,nil];


还有个地方说这样改:

;

 [[NSAssertionHandler currentHandler] handleFailureInFunction:functionString file:fileString lineNumber:(NSInteger)[lineNumber longValue] description:descriptionString];
 
 
A :  
[[ 
NSAssertionHandler 
 
currentHandler 
] 
handleFailureInFunction 
:functionString 
file 
:fileString 
lineNumber 
:( 
NSInteger 
)[lineNumber 
longValue 
description 
: 
@"%@" 
,descriptionString]; 
 

转载自:http://blog.csdn.net/shijiucdy/article/details/8755667

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读