cJustify

Centers a string in a given field length by adding spaces to either side.

cJustify(string, length) → returns string

Argument Reference

string string
Required

The string that is to be centered

length numeric
Required

The length of the field in which the string should be centered

Examples
Sample code invoking the cJustify function

<cfset jstring = cJustify("ColdFusion", 35)> 
 <cfdump var="#jstring#" />   

Fork me on GitHub