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