开发者

how to check how many file names start with certain chars?

I have an iphone app that saves some people's data on a single file. Each filename is represented by the user name plus an incremental number, say "tommy1", "tommy2",... , "tommy32", then "sarah1", "sarah2", and so on.

Is it possible to count how many of them are "tommy"'s and how many are "sarah"'s from with开发者_如何学Cin the code ? thanks


-[NSFileManager contentsOfDirectoryAtPath:error:]

and

-[NSString hasPrefix:]

and perhaps NSCountedSet.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜