更新时间:2023-02-22 22:12:09
获取由 @" "
分隔的组件,并从结果中删除所有类似 @""
的对象数组.
Get the components separated by @" "
and remove all objects like @""
from the resultant array.
NSString* line = @"1 2 3";
NSMutableArray *array = (NSMutableArray *)[line componentsSeparatedByString:@" "];
[array removeObject:@""]; // This removes all objects like @""