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 />");
}

Search CFLib.org


Latest Additions

Raymond Camden added
QueryDeleteRows
November 04, 2017

Leigh added
nullPad
May 11, 2016

Raymond Camden added
stripHTML
May 10, 2016

Kevin Cotton added
date2ExcelDate
May 05, 2016

Raymond Camden added
CapFirst
April 25, 2016

Created by Raymond Camden / Design by Justin Johnson