upperFirst(name)
Last updated March 17, 2010
Version: 0 | Requires: CF5 | Library: StrLib
Description:
Converts the first letter of a string to upper case, while keeping the rest of the string as is.
Return Values:
Returns a string.
Example:
<cfoutput>
#upperFirst("myFirst")#
</cfoutput>
Parameters:
Name | Description | Required |
---|---|---|
name | String to capitalize the first letter of | Yes |
Full UDF Source:
<!---
Upper cases the first letter of a string.
Phil Arnold (philip.r.j.arnold@googlemail.com
@param name String to capitalize the first letter of (Required)
@return Returns a string.
@author Brian Meloche (brianmeloche@gmail.com)
@version 0, March 17, 2010
--->
<cffunction name="upperFirst" access="public" returntype="string" output="false" hint="I convert the first letter of a string to upper case, while leaving the rest of the string alone.">
<cfargument name="name" type="string" required="true">
<cfreturn uCase(left(arguments.name,1)) & right(arguments.name,len(arguments.name)-1)>
</cffunction>
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