array help

How do i get the number of Strings that match in a String array?

Replies

Match what? Match each other or match a particular string? And if "each other" what do you wish to count - the number of strings that have a duplicate element or the number of non-unique strings.


Once you answer that question you will most likely want to create an alphabetically sorted array and then just iterate through that array counting the matches.

You should avoid duplicating the question in several forums.


I think you got an answer for this in the Swift forum.

Get the number of strings in a array that match a string