You can use it to find the most common string in a given list of strings or an array of strings(you might need to change the code a little bit).
For example: The input is :"test","something","foo","test","test","foo". Then the output will be "test". Another example : The input is "test", "test", "foo","foo","somethingelse". Then the output will be "test" and "foo".
It may cause a little bit of performance problem. Don't call the function every frame. Use it only when neccessary.
If you have any questions, feel free to contact me at [email protected]. I would be glad to help you.