private static bool AreCategoriesEqual()

in src/cs/PhoneticMatchingTests/Matchers/PlaceMatcherTests.cs [169:194]


            private static bool AreCategoriesEqual(string[] categories1, string[] categories2)
            {
                if (categories1 == null || categories2 == null)
                {
                    // one or both is null
                    return categories1 == categories2;
                }

                if (categories1.Length == categories2.Length)
                {
                    for (int idx = 0; idx < categories1.Length; ++idx)
                    {
                        if (categories1[idx] != categories2[idx])
                        {
                            // categories are not the same or are not ordered
                            return false;
                        }
                    }

                    // categories are the same
                    return true;
                }

                // categories don't have same length
                return false;
            }