cf has a nice repeatstring() function:
<cfoutput>
<cfif len(trim(string)) lt 25>
#repeatstring(' ', 25-len(trim(string))) &
string#
<cfelseif len(trim(string)) gt 25>
#left(string, 22)#...
<cfelse>
#string#
</cfif>
</cfoutput>
hth
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/