Pchp.Library.Arrays.natcasesort C# (CSharp) Method

natcasesort() public static method

Sorts an array using case insensitive natural comparison method for comparing values preserving key-value association.
Resets array's intrinsic enumerator.
public static natcasesort ( Context ctx, [ array ) : bool
ctx Pchp.Core.Context Current runtime context.
array [ The array to be sorted.
return bool
        public static bool natcasesort(Context ctx, [In, Out] PhpArray array)
        {
            if (array == null)
            {
                //PhpException.ReferenceNull("array");
                //return false;
                throw new ArgumentNullException();
            }

            array.Sort(new ValueComparer(new PhpNaturalComparer(ctx, true), false));

            return true;
        }