If I have this array:
["A", "B", "C", "D"]
I have this string:
"C"
I want to reorder the array to look like this:
["C", "A", "B", "D"]
So, the passed in string will move the matching element to the front of the list.
See Question&Answers more detail:os