简体   繁体   English

逐行扫描字符串

[英]Scanning a string line by line

I have an nsstring with 50 of lines i want to scan a particular string using nsscanner scanning each lines. 我有一个包含50行的nsstring,我想使用nsscanner扫描每行来扫描特定的字符串。

Is it possible ? 可能吗 ?

Can anyone help me? 谁能帮我?

Thanks in advance...... 提前致谢......

It is possible; 有可能的; you just need to split the string, and then scan each line for the string you are looking for. 您只需要拆分字符串,然后在每一行中搜索所需的字符串即可。

Why are you using NSScanner ? 为什么要使用NSScanner Would not it be easier to simply search for the string? 简单地搜索字符串会更容易吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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