Hi, I have a question about LJustify() and left().
I'm creating a file that has a fixed width of spaces. But for some reason when the "Address", and "city" fields are all together.
According to the first <cfset> shouldn't the "ADDRESS" have 40 chars of space and "CITY" have 30 chars?? So if ADDRESS is only 15 chars long, should the rest be filled with empty spaces??
I would love the help ASAP.
Thanks.
____________________________________
Just Imagine.
I'm creating a file that has a fixed width of spaces. But for some reason when the "Address", and "city" fields are all together.
Code:
This is what I am doing:
[COLOR=red]
SETS THE "ADDRESS", and "CITY" FOR A SET NUMBER OF SPACES
<cfset Address = " "> - (this is 40 chars long)
<cfset City = " "> - (this is 30 chars long)
[/color]
[COLOR=green]
And the following uses LJustify() and Left()
<cfset Address = LJustify(left(Address, 40), 40)>
<cfset city = LJustify(left(City, 30), 30)>
[/color]
But the results show up like this:
[COLOR=blue]123 SOME STREET[/color][COLOR=red]NYC[/color]
I would love the help ASAP.
Thanks.
____________________________________
Just Imagine.