<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
  SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
  <func>
    <title>SortArrayByProperty</title>
    <category>Script</category>
    <subcat>Arrays</subcat>
    <version>5.4 OC</version>
    <syntax>
      <rtype>bool</rtype>
      <params>
        <param>
          <type>array</type>
          <name>array2sort</name>
          <desc>Array that is to be sorted</desc>
        </param>
        <param>
          <type>string</type>
          <name>property_name</name>
          <desc>Name of property by which the array is to be sorted</desc>
        </param>
        <param>
          <type>bool</type>
          <name>descending</name>
          <desc>If true, elements are sorted in descending (highest to lowest) order. Otherwise ascending order.</desc>
        </param>
      </params>
    </syntax>
    <desc>Sorts an array of proplists by a property. All elements must be proplists. Properties should be either all strings or all integer. If a property is not assigned, it is assumed to be integer zero.</desc>
    <related>
      <funclink>SortArray</funclink>
      <funclink>SortArrayByArrayElement</funclink>
    </related>
  </func>
  <author>Sven2</author><date>2012-12</date>
</funcs>
