CFLib.org – Common Function Library Project

randomLastName()

Last updated June 18, 2010

author

Matt Casey

Version: 1 | Requires: CF6 | Library: UtilityLib

Description:
Returns a random last name from an internal list. Stupidly simple but handly non the less. List was taken from England/Wales top 100 at http://www.taliesin-arlein.net

Return Values:
Returns a string.

Example:

<cfoutput>#randomLastName()#</cfoutput>

Parameters:

No arguments.

Full UDF Source:

<!---
 Returns a random last name.
 
 @return Returns a string. 
 @author Matt Casey (matt@digitalhappy.com) 
 @version 1, June 18, 2010 
--->
<cffunction name="randomLastName" output="false" access="public" returntype="any" hint="">
	<cfset names = "Adams,Ahmed,Ali,Allen,Anderson,Bailey,Baker,Barker,Barnes,Begum,Bell,Bennett,Brown,Butler,Campbell,Carter,Chapman,Clark,Clarke,Collins,Cook,Cooper,Cox,Davies,Davis,Dixon,Edwards,Ellis,Evans,Fisher,Foster,Gray,Green,Griffiths,Hall,Harris,Harrison,Harvey,Hill,Holmes,Hughes,Hunt,Hussain,Jackson,James,Jenkins,Johnson,Jones,Kelly,Khan,King,Knight,Lee,Lewis,Lloyd,Marshall,Martin,Mason,Matthews,Miller,Mills,Mitchell,Moore,Morgan,Morris,Murphy,Owen,Palmer,Parker,Patel,Phillips,Powell,Price,Richards,Richardson,Roberts,Robinson,Rogers,Russell,Scott,Shaw,Simpson,Singh,Smith,Stevens,Taylor,Thomas,Thompson,Turner,Walker,Ward,Watson,Webb,White,Wilkinson,Williams,Wilson,Wood,Wright,Young" />	
	<cfreturn listGetAt(names, randRange(1,100)) />
</cffunction>
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