Wow: LJustify(), RJustify(), and CJustify() functions. Who woulda thunk it. Brilliant. I guess.
On 22 August 2011 17:37, Justin Scott <leviat...@darktech.org> wrote: > >> I'm attemping to create a function that adds spaces either >> in front of or behind a string. > > Hi Josh, a couple of things. First, ColdFusion has the LJustify(), > RJustify(), and CJustify() functions which will do exactly what you're > trying to accomplish already built in. > > Second, your function (at a glance) appears that it would work, but > when you say you're only getting one space are you referring to the > actual output, or just what you see on the browser screen after the > page has been rendered? Remember that in HTML, multiple spaces (or > other whitespace in the output code) will get truncated down to a > single space. You could wrap the output with <pre></pre> tags to > force it to show all of the whitespace as it exists in the code, or > append the HTML character entity for a space instead ( ) to force > multiple spaces to show in the output rendering. > > > -Justin > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346930 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm