Array<String> does not have a member named 'contains' in swift -
this question has answer here:
- how check if element in array 12 answers
can use contains method on array or have instead use filter method , loop through check?
given ignores array<string>
e.g.
return self.ignores.filter({ (user) -> bool in user == username }).count > 0 or
return self.ignores.contains(username);
try this
contains(ignores, username)
Comments
Post a Comment