CFLib.org – Common Function Library Project

isUpper(str)

Last updated May 17, 2006

author

Trevor Orr

Version: 2 | Requires: CF5 | Library: StrLib

Description:
Returns true if a string is all upper case characters or false if not all upper case characters.

Return Values:
Returns a boolean.

Example:

<cfset str = "RAYMOND">
<cfif IsUpper(str)>
    <cfoutput>#str#</cfoutput>
</cfif>

Parameters:

Name Description Required
str String to check. Yes

Full UDF Source:

<!---
 Checks to see if a string is all upper case characters
 v2 by Raymond Camden
 
 @param str      String to check. (Required)
 @return Returns a boolean. 
 @author Trevor Orr (fractorr@yahoo.com) 
 @version 2, April 9, 2007 
--->
<cffunction name="isUpper" output="false" returntype="boolean">
    <cfargument name="str" type="string" required="true" />
    <cfreturn compare(arguments.str,uCase(arguments.str)) is 0>
</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

Created by Raymond Camden / Design by Justin Johnson