Remove elements from one NSMutableArray which are contained in another array

前端 未结 1 463
终归单人心
终归单人心 2021-01-18 00:26

I have two arrays, A and B.

How can I remove elements from A, if those elements exist in B?

e.g. Array A:{1,2,3,4,5}, array B:{1,3}

I would like to

相关标签:
1条回答
  • 2021-01-18 01:29

    You have the removeObjectsInArray: method from NSMutableArray. It does what you want.

    0 讨论(0)
提交回复
热议问题