<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>CJUSTIFY</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">CJUSTIFY</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Centers a string in a field length.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Returns</span>
<p>
String, center-justified by adding spaces before or after the input parameter. If length is less than the length of the input parameter string, the string is returned unchanged.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Display and formatting functions, String functions
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Function syntax</span><pre>Cjustify(string, length)
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
LJustify, RJustify
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Parameters</span>
<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span><pre>&lt;!--- This example shows how to use CJustify ---&gt;
&lt;CFPARAM name = &quot;jstring&quot; DEFAULT = &quot;&quot;&gt;

&lt;cfif IsDefined(&quot;FORM.submit&quot;)&gt;
&lt;cfdump var=&quot;#Form#&quot;&gt; 
   &lt;cfset jstring = Cjustify(&quot;#FORM.justifyString#&quot;, 35)&gt;
&lt;/cfif&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;CJustify Example&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h3&gt;CJustify&lt;/h3&gt;
&lt;p&gt;Enter a string; it will be center-justified within the sample field.
&lt;form action = &quot;cjustify.cfm&quot; method=&quot;post&quot;&gt;
&lt;p&gt;&lt;input type = &quot;Text&quot; value = &quot;&lt;cfoutput&gt;#jString#&lt;/cfoutput&gt;&quot; 
      size = 35 name = &quot;justifyString&quot;&gt;
&lt;p&gt;&lt;input type = &quot;Submit&quot; name = &quot;submit&quot;&gt; 
&lt;input type = &quot;RESET&quot;&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt; 
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="STRING">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">STRING</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>


<p>A string or a variable that contains one. May be empty. If it is a variable that is defined as a number, the function processes it as a string. </p>

  </td>
  </tr>
  </table>
</div>
<div id="LENGTH">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">LENGTH</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>


<p>A positive integer or a variable that contains one. Length of field.</p>
<p>Can be coded as: </p><ul>

<li>A number; for example, 6</li>

<li>A string representation of a number; for example, &quot;6&quot;</li>
</ul>

<p>Any other value causes ColdFusion to throw an error.</p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
