在Objective-c中解析文件的最佳方法 [英] Best way to parse a file in Objective-c

查看:113
本文介绍了在Objective-c中解析文件的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Objective-c解析出类似apache的配置文件.最好的起点在哪里?在这个平台上,我还没有做很多文件读写操作.

I am trying to parse out an apache-like config file using Objective-c. Where is the best place to start? I haven't done a lot of file read/write on this platform.

谢谢!

推荐答案

您可以使用NSString和NSScanner,但我发现通常仅将C API直接用于纯ASCII文件会更容易.

You could use NSString and NSScanner, but I generally find it easier just to use C APIs directly for pure ASCII files.

类似的东西

http://www.mrx.net/c/readfunctions.html

http://bytes.com/topic/c /insights/657086-how-parse-file-c

而且,在堆栈溢出时:

在C/C ++中解析配置文件

这篇关于在Objective-c中解析文件的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆