but this would only really work with 1 char strings as "jediHomer" will
return a positive value... something like


<CFIF Len(REReplace(sString, "[[:lower:]]", "", "ALL")) EQ Len(sString)>


would then tell you if the whole string was upper or lower.

HTH



-----Original Message-----
From: Brad Roberts [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 12:48
To: CF-Talk
Subject: RE: VB Functions --> Coldfusion?

You could wrap that in a UDF and submit it to cflib.org :)

It would be something like...

<cfscript>
function isUpper(str) {
  return reFind("[[:upper:]]", str, 1);
}
</cfscript>

<!--- OR, FOR CFMX --->
<cffunction name="isUpper" output="false" returntype="boolean">
<cfargument name="str" type="string" required="true">
<cfreturn reFind("[[:upper:]]", str, 1)>
</cffunction>

-Brad

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 7:18 AM
To: CF-Talk
Subject: RE: VB Functions --> Coldfusion?

Thanks Mike

BTW, I used ReFind("[[:upper:]]",strChar) for IsUpper()

-----Original Message-----
From: Mike Townend [mailto:[EMAIL PROTECTED]
Sent: 22 October 2003 11:05 am
To: CF-Talk
Subject: RE: VB Functions --> Coldfusion?

Left() = Left()
Mid() = Mid()
IsNumeric() = IsNumeric()
CInt() = Val()
CStr() = toString()
IsUpper() = not sure about this one off hand
InStr() = Find() or FindNoCase()
Left() = Left()

HTH

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 10:57
To: CF-Talk
Subject: VB Functions --> Coldfusion?

Hi all,

New to the list/ColdFusion and need some advice from you chaps. Basically, I
want to convert a some VB to run on ColdFusion and was wondering whether
Coldfusion has an equivalent function to the following VB functions. (I need
to know whether it's worth wasting my time.)

Len() - Returns an integer containing either the number of characters in a
string or the number of bytes required to store a variable
Mid() - Returns a string containing a specified number of characters from a
string
IsNumeric() - Returns a Boolean value indicating whether an _expression_ can
be evaluated as a number.
CInt() - Returns an _expression_ that has been converted to a Variant of
subtype Integer.
CStr() - Returns an _expression_ that has been converted to a Variant of
subtype String
IsUpper() - Indicates whether a Unicode character is categorized as an
uppercase letter.
InStr() - Returns an integer specifying the start position of the first
occurrence of one string within another.
Left() - Returns a string containing a specified number of characters from
the left side of a string.

Any feedback would be very helpful.

Thanks,
Rob

  _____

  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to