Sort a delimited list of items in their natural string order. Note that
the value
and refid
attributes are mutually exclusive,
and the value
attribute takes precedence if both are specified.
Attribute | Description | Required |
---|---|---|
property | The property to set with the sorted list of values. | Yes. |
value | The list of values to process, with the delimiter character, indicated by the "delimiter" attribute, separating each value. | Yes, unless "refid" is specified. |
refid | The id of where the list of values to sort is stored. | Yes, unless "value" is specified. |
delimiter | The delimiter string that separates the values in the "list" attribute. | No, defaults to ",". |
casesensitive | If true , does a caseinsensitive sorting
of the strings.
|
No. Defaults to false. |
numeric | If true , does a numeric sorting, treating
all list entries as if they were numbers.
|
No. Defaults to false. |
<property name="my.list" value="z,y,x,w,v,u,t" /> <sortlist property="my.sorted.list" value="${my.list}" delimiter="," /> <echo message="${my.sorted.list}" />
prints[echo] t,u,v,w,x,y,z
Copyright © 2002-2003 Ant-Contrib Project. All rights Reserved.