summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2015-11-18 15:43:45 +0100
committerUrban Müller2015-11-18 15:43:45 +0100
commit7ec6608d170d61bee84768b3d7aa0186c21e7dd8 (patch)
tree0e25060083b1ca36a83e54cbc7a82bfbf416e1ac /it.class
parentb52db895457e3b2470409a892e0de944e23ea4be (diff)
downloaditools-7ec6608d170d61bee84768b3d7aa0186c21e7dd8.tar.gz
itools-7ec6608d170d61bee84768b3d7aa0186c21e7dd8.tar.bz2
itools-7ec6608d170d61bee84768b3d7aa0186c21e7dd8.zip
it::sort docs
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