开发者

Count string value?

开发者 https://www.devze.com 2022-12-26 09:31 出处:网络
Hey, Im a newbie in cocoa and I have a stri开发者_运维问答ng and I am trying to count how long it is.I have been searching through Apples docs but I can\'t find anything.

Hey, Im a newbie in cocoa and I have a stri开发者_运维问答ng and I am trying to count how long it is. I have been searching through Apples docs but I can't find anything.

NSString *word = @"word";

How would I figure out how many characters is in a string?

Thanks


This should do the trick:

[word length];
0

精彩评论

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