% sign in string objective c
问题 i am wondering how i do a % sign within a NSString, i have tried \% and \\% 回答1: Try %% . Short question, short answer. :) 回答2: just put %% to use a % sign within objective c. 回答3: There's no special escaping required for percent signs. Just write: str = @"Rate of Return (in %)"; ...unless you mean NSString stringWithFormat . But your question doesn't say so. 回答4: According to Apple's 'String Format Specifiers' page, simply use %% . For example: NSString * aString = @"50%%"; Reference: http:/