View comments | RSS feed
Contents > CFML Reference > ColdFusion Functions > RJustify PreviousNext

RJustify

Right justifies characters of a string.

A copy of a string, right-justified in the specified field length.

Display and formatting functions, String functions

RJustify(string, length)

CJustify, LJustify

Parameter

Description

string

A string enclosed in quotation marks, or a variable that contains one.

length

A positive integer or a variable that contains one. Length of field in which to justify string.

<!--- This example shows how to use RJustify --->
<cfparam name = "jstring" default = "">

<cfif IsDefined("FORM.justifyString")>
   <cfset jstring = rjustify(FORM.justifyString, 35)>
</cfif>
<html>
<head>
<title>RJustify Example</title>
</head>
<body>
<h3>RJustify Function</h3>
<p>Enter a string. It will be right justified within the sample field

<form action = "rjustify.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 > RJustify PreviousNext

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.

Comments


Adrian Lynch said on Jan 9, 2005 at 12:59 PM :
The example code is missing the method attribute in the form tag. It won't work as is.

http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/functa75.htm#wp1111739

Ade

 

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

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functa75.htm