lJustify
Description
Left justifies characters in a string of a specified length.
Categories
Related
Syntax
LJustify(string, length)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| length | Length of field in which to justify string | ||
| string | A string or a variable that contains one |
Returns
A copy
of a string, left-justified.
Example
<!--- This example shows how to use LJustify --->
<cfparam name = "jstring" default = "">
<cfif IsDefined("FORM.justifyString")>
<cfset jstring = LJustify(FORM.justifyString, 35)>
</cfif>
<html>
<head>
<title>LJustify Example</title>
</head>
<body>
<h3>LJustify Function</h3>
Enter a string, and it will be left justified within the sample field
<form action = "ljustify.cfm">
<input type = "Text" value = "<cfoutput>#jString#</cfoutput>"
size = 35 name = "justifyString">
<input type = "Submit" name = ""> <input type = "RESET">
</form>