Contents > CFML Reference > ColdFusion Functions > LJustify PreviousNext

LJustify

Left justifies characters in a string of a specified length.

A copy of a string, left-justified.

Display and formatting functions, String functions

LJustify(string, length)

CJustify, RJustify

Parameter

Description

string

A string or a variable that contains one

length

Length of field in which to justify string

<!--- 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>
<p>Enter a string, and it will be left justified within the sample field

<form action = "ljustify.cfm">
<p><input type = "Text" value = "<cfoutput>#jString#</cfoutput>" 
 size = 35 name = "justifyString">

<p><input type = "Submit" name = ""> <input type = "RESET">
</form>

Contents > CFML Reference > ColdFusion Functions > LJustify PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.