Attached is the java file and the doc file (with a .txt attached to the end
to make sure it gets through.)

-- Larry

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>propertyformatter Task</title>
</head>

<body>

<h2><a name="propertyformatter">propertyformatter</a></h2>
<h3>Description</h3>
<p>Formats a string to a paticular format.</p>

<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
  <tr>
    <td valign="top"><b>Attribute</b></td>
    <td valign="top"><b>Description</b></td>
    <td align="center" valign="top"><b>Required</b></td>
  </tr>
  <tr>
    <td valign="top">property</td>
    <td valign="top">Property to set new formatted string to.</td>
    <td valign="top" align="center">Yes</td>
  </tr>
  <tr>
    <td valign="top">string</td>
    <td valign="top">Either a current property or text to be formatted.</td>
    <td valign="top" align="center">Yes</td>
  </tr>
  <tr>
    <td valign="top">format</td>
    <td valign="top">One of the following: &quot;<code>trim</code>&quot;, 
&quot;<code>strip</code>&quot;, &quot;<code>deletewhitespace</code>&quot;, 
&quot;<code>chomp</code>&quot;, &quot;<code>chop</code>&quot;, 
&quot;<code>uppercase</code>&quot;, &quot;<code>lowercase</code>&quot;, 
&quot;<code>swapcase</code>&quot;, &quot;<code>capitalize</code>&quot;, 
&quot;<code>uncapitalize</code>&quot;, &quot;<code>reverse</code>&quot;, 
&quot;<code>catitalizewords</code>&quot;, 
&quot;<code>capipalizewordsfully</code>&quot;, 
&quot;<code>uncapitalizewords</code>&quot;</td>
    <td valign="top" align="center">Yes</td>
  </tr>
</table>

<h3>Formats</h3>
<table border="1" cellpadding="2" cellspacing="0">
  <tr>
    <td valign="top">Format Name</td>
    <td valign="top">Format Description</td>
  </tr>
  <tr>
    <td valign="top">trim</td>
    <td valign="top">Removes control characters (<code>char &lt; 32</code>) 
from both ends of the string.</td>
  </tr>
  <tr>
    <td valign="top">strip</td>
    <td valign="top">Similar to <code>trim</code>, but removes whitespace 
instead. Whitespace is defined by <code><a 
href="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Character.html#isWhitespace(char)">Character.isWhiteSpace(char)</a></code></td>
  </tr>
  <tr>
    <td valign="top">deletewhitespace</td>
    <td valign="top">Deletes all whitespace from the string, not just from the 
front or end. Whitespace is defined by <code><a 
href="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Character.html#isWhitespace(char)">Character.isWhiteSpace(char)</a></code></td>
  </tr>
  <tr>
    <td valign="top">chomp</td>
    <td valign="top">removes one newline from the end of the string, if it's 
there, otherwise leave it alone. A newline is &quot;<code>\n</code>&quot;, 
&quot;<code>\r</code>&quot; or &quot;<code>\r\n</code>&quot;. Closely matches 
Perl's <code><a 
href="http://perldoc.com/perl5.8.0/pod/func/chomp.html";>chomp</a></code>.</td>
  </tr>
  <tr>
    <td valign="top">chop</td>
    <td valign="top">Removes the last character from the string. If the string 
ends with &quot;<code>\r\n</code>&quot;, then both of them are removed.</td>
  </tr>
  <tr>
    <td valign="top">uppercase</td>
    <td valign="top">Converts the string to uppercase, per <a 
href="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html#toUpperCase()"><code>String.toUpperCase()</code></a>.</td>
  </tr>
  <tr>
    <td valign="top">lowercase</td>
    <td valign="top">Converts the string to lowercase, per <a 
href="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html#toLowerCase()"><code>String.toLowerCase()</code></a>.</td>
  </tr>
  <tr>
    <td valign="top">swapcase</td>
    <td valign="top">Swaps the case of the string changing upper and title case 
to lower case, and lower case to upper case.</td>
  </tr>
  <tr>
    <td valign="top">capitalize</td>
    <td valign="top">Capitalizes the string by changing the first letter to 
title case, per <a 
href="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Character.html#toTitleCase(char)"><code>Character.toTitleCase(char)</code></a>.
 No other letters are changed.</td>
  </tr>
  <tr>
    <td valign="top">uncapitalize</td>
    <td valign="top">Uncapitalizes the string by changing the first letter 
lowercase, per <a 
href="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Character.html#toLowerCase(char)"><code>Character.toLowerCase(char)</code></a>.
 No other letters are changed.</td>
  </tr>
  <tr>
    <td valign="top">reverse</td>
    <td valign="top">Reverses the string, per <a 
href="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/StringBuffer.html#reverse()">StringBuffer.reverse()</code></a>.</td>
  </tr>
  <tr>
    <td valign="top">capitalizewords</td>
    <td valign="top">Capitalizes all the whitespace separated words in the 
string. Only the first letter of each word is changed. To change all letters to 
the capitalized case, use <code>capitalizewordsfully</code>. Whitespace is 
defined by <code><a 
href="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Character.html#isWhitespace(char)">Character.isWhiteSpace(char)</a></code></td>
  </tr>
  <tr>
    <td valign="top">capitalizewordsfully</td>
    <td valign="top">Capitalizes all the whitespace separated words in the 
string. All letters are changed. Whitespace is defined by <code><a 
href="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Character.html#isWhitespace(char)">Character.isWhiteSpace(char)</a></code></td>
  </tr>
  <tr>
    <td valign="top">uncapitalizewords</td>
    <td valign="top">Uncapitalizes all the whitespace separated words in the 
string. Uncapitalizes all the whitespace separated words. Whitespace is defined 
by <code><a 
href="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Character.html#isWhitespace(char)">Character.isWhiteSpace(char)</a></code></td>
  </tr>
</table>
<h3>Examples</h3>
<p><b>Convert a property into all uppercase</b></p>
<pre>
  &lt;propertyformatter property=&quot;hostname.upper&quot; 
value=&quot;${hostname}&quot; format=&quot;uppercase&quot;/&gt;
</pre>
<!-- TODO: more examples -->
<hr><p align="center">Copyright &copy; 2003 Apache Software Foundation.
All rights Reserved.</p>

</body>
</html>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to