summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class3
1 files changed, 3 insertions, 0 deletions
diff --git a/it.class b/it.class
index b097e60..d44d502 100644
--- a/it.class
+++ b/it.class
@@ -1030,6 +1030,9 @@ static function json_decode($json)
return ($data = json_decode($json)) === null && $json != 'null' ? it::error(array('title' => "invalid json", 'body' => $json)) : $data;
}
+/**
+ * Retuns sorted array. mode string can contain combinations of a for assoc, k for key, r for reverse and n for numeric
+ */
static function sort($array, $mode = "")
{
$func = it::replace(array('n' => ""), count_chars($mode, 3)) . "sort"; # count_chars sorts flags