CFLib.org – Common Function Library Project

VerticalText(text)

Last updated August 14, 2002

author

Nathan Dintenfass

Version: 1 | Requires: CF5 | Library: StrLib

Description:
Puts line breaks into text to make it appear vertically.

Return Values:
Returns a string.

Example:

<cfoutput>#VerticalText("Hello World")#</cfoutput>

Parameters:

Name Description Required
text Text to modify. Yes

Full UDF Source:

/**
 * Take a string, make it appear vertically.
 * 
 * @param text 	 Text to modify. (Required)
 * @return Returns a string. 
 * @author Nathan Dintenfass (nathan@changemedia.com) 
 * @version 1, August 14, 2002 
 */
function VerticalText(text){
	//build an array of the characters in the string
	var arrText = arrayNew(1);
	//a variable for looping
	var ii = 1;
	//the len of the string
	var textLen = len(text);
	//resize the array the length of the string
	arrayResize(arrText,textLen);
	//loop through the length of the string, building the array
	for(ii = 1; ii LTE textLen; ii = ii + 1){
		arrText[ii] = mid(text,ii,1);
	}
	return arrayToList(arrText,"<br />");
}
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson