开发者

IOS: NSString split

开发者 https://www.devze.com 2023-03-24 01:15 出处:网络
I have this NSString开发者_如何学Python: NSString *perc = @\"- 20 %\"; I want only \"20 %\". What can I do?[perc subStringFromIndex:2];

I have this NSString开发者_如何学Python:

NSString *perc = @"- 20 %";

I want only "20 %".

What can I do?


[perc subStringFromIndex:2];

There are different functions for substrings, take a look at them either typing "subString" and getting xcode help, or in traditional way - from doc :)

0

精彩评论

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