Administer > Deploy > Overview: WebSphere Commerce Build and Deployment tool > Customize the Build and Deployment tool > Custom Ant tasks


StringLengthCompare condition

Compares the length of a string with a set length.


Parameters

Attribute Description Required
String The string to compare. Yes
Op One of: <=, <, ==, &gt;, &gt;= Yes
Length The length to compare against. Yes
Trim Whether to trim the string before validation No; Defaults to false


Examples

The following example checks whether ${source.dir} is an empty string after trimming and sets the property emptyString if true:

<condition property="emptyString"> 
    <stringLengthCompare string="${source.dir}" op="==" length="0" trim="true" /> 
</condition>


Related concepts

Overview: WebSphere Commerce Build and Deployment tool

Related reference

Custom Ant tasks


+

Search Tips   |   Advanced Search