LJustify

Description

Left justifies characters in a string of a specified length.

Return value

A copy of a string, left-justified.

Category

Display and formatting functions, String functions

Syntax

LJustify(string, length)

See also

CJustify, RJustify

Parameters

Parameter Description
string
A string or a variable that contains one
length
Length of field in which to justify string

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>
<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>

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

Version 6

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

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/functions-pt224.htm