使用 NSMutableString,如何在名为“a”的 NSMutableString 的索引“0”处插入“-”符号。现在我的代码如下所示:
a = [insertString: @"-" atIndex: 0];
Xcode 抛出错误,指出“insertString”未声明。我的代码看起来很不对劲。请给我指导。
最佳答案
将对象放在括号内:
[a insertString: @"-" atIndex: 0];
关于iphone - Objective C - 对 NSMutable 字符串使用 insertString,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1091378/