开发者

How to parse a string for an integer matrix in Objective C

Can someone help me extracting a 2D matrix of integers from a string like the one below in Objective C?

1 1 0 0 -1

-1 0 1 1 0

0 -1 0 开发者_运维百科1 0

0 0 -1 -1 1


The easiest way is probably to use an NSScanner object. See the Strings Programming Guide for further info.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜