Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166681
---
Thats it. Thanks man!

Joe Rinehart wrote:

> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166679
> ---
> Phillip,
>
>
> LJustify(string, length) is a function made just for this.
>
>
> #lJustify(dealer_code, 8)#
>
>
> -Joe
>
> -----Original Message-----
> From: Phillip B [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 10:28 AM
> To: CF-Talk
> Subject: Simple way to add spaces
>
>
> Archive: http://www.houseoffusion.com/lists.cfm/link=i:4:166677
> ---
> I need to write a fixed length file on a daily basis. and need
> to find a
> simple way of adding the missing spaces to a string.
>
> The issue I'm having is adding the trailing spaces to the end of
> each
> field. I can do a len on the string and then subtract it from
> the amount
> needed but I cant think of a good way to add the missing spaces
> with out
> doing a loop. I have to do this on 15 fields in 500 + records so
> I want
> to do it the right way.
>
> There has to be a better way than this.
> <cfif len(dealer_code) lt 8><cfloop index="foo" from="1"
> to="#Int(8-len(dealer_code))#" step="1"> </cfloop></cfif>
>
> This is one of those rush jobs for a VP and I haven't had the
> time to
> really think about the right way to do this.
>
> Thanks
>
> Phillip B.
>   _____
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to