Centers a string in a field length.
String, center-justified. If length is less than the length of the string, the string is returned unchanged.
Display and formatting functions, String functions
Cjustify(string, length)
<!--- This example shows how to use CJustify ---> <CFPARAM name = "jstring" DEFAULT = ""> <cfif IsDefined("FORM.justifyString")> <cfset jstring = Cjustify("#FORM.justifyString#", 35)> </cfif> <html> <head> <title>CJustify Example</title> </head> <body> <h3>CJustify</h3> <p>Enter a string; it will be center-justified within the sample field. <form action = "cjustify.cfm"> <p><input type = "Text" value = "<cfoutput>#jString#</cfoutput>" size = 35 name = "justifyString"> <p><input type = "Submit" name = ""> <input type = "RESET"> </form> </body> </html>