ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Re: Get Upper Case of a String
Date Wed, 22 Aug 2001 05:46:28 GMT
Ok, this is a bit extreme (but gave me an excuse to toy with the <script>
task some):

  <target name="UpperCaseIt">
    <property name="lowercased" value="abcdefghijk"/>
    <script language="javascript"><![CDATA[
        var proj = UpperCaseIt.getProject();

    <echo message="New Property = ${uppercased}"/>

Which output this:

     [echo] New Property = ABCDEFGHIJK

I'm sure there is a more elegant ways to do this with <script>.   Does
anyone have slick examples of useful things that can be accomplished with
the <script> task?   Is there a handy variable that gives you access to the
current task or project without having to do it by name within the script
task?   I'm somewhat familar with BSF and it looks like you're just handed
targets, references, and properties - but it would be nice if it handed over
"project", "target", and "task" (or perhaps called "this" instead of "task")
as pre-defined accessible objects rather than having to call getters to get
at them.


----- Original Message -----
From: <>
To: <>
Sent: Tuesday, August 21, 2001 5:24 PM
Subject: Get Upper Case of a String

> Folks,
> Anyway that I can get an upper case of a string in Ant?
> Thanks in advance
> Chris

View raw message