如何从数组iphone sdk中删除特定对象

Pan*_*hla -1 iphone xcode objective-c ipad

我在不规则空间之间有一串这些单词

 "gbpjpy buy 132.00/15  131.95 update close at 132.40 close at 132.40 120+ gbpjpy buy 132.00/15 131.50 45 new 90 120+       gpbusd buy    update HIT 40 PIPS HIT 110 PIPS  gpbusd buy   BREAK EVEN update HIT 100+  gpbusd buy 1.5500/25 1.5455  new 40 100+  gpbusd buy    update CLOSE 0 TO 10 PIPS N   gpbusd buy 1.5335/50 1.5320  new 40 80+  gpbusd buy    update     15-20 PIPS CLOSE KEEP OPEN gpbusd buy 1.5530/50     1.5505 update HIT 80 KEEP OPEN gpbusd buy 1.5530/50 1.5465  new 40 80 100+"
Run Code Online (Sandbox Code Playgroud)

在这个字符串中有不规则的空格?任何人都可以告诉你删除这些空格的正确方法吗?

Rol*_*asR 5

[yourArray removeObject:@"object"];
Run Code Online (Sandbox Code Playgroud)

yourArray必须是muttable


Aji*_*ith 5

或者你可以做到这一点也[yourArray removeObjectAtIndex:index]; 看的头文件NSArrayNSMutableArray.