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