It was the mail client! It didn't dropped the tabs! Honest!

B)

Aaron DC wrote:
Cool.

(My eyes bleed every time I see code with no indenting)

Aaron

----- Original Message ----- From: "Brett Payne-Rhodes" <[EMAIL PROTECTED]>
To: "CFAussie Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, July 08, 2004 11:58 AM
Subject: [cfaussie] RE: Count occurances of a character in a string




Thanks everyone. Lots of great ideas and links.

In the end I looked at some UDF examples of similar functions and then wrote my own very simple UDF:

<cfscript>
function countChar(srchString, srchVal) {
var charCount=0;
var strLen=len(srchString);
for (idx=1; idx LTE strLen; idx=idx+1) {
if (mid(srchString, idx, 1) eq srchVal) {
charCount = charCount + 1;
}
}
return charCount; }
</cfscript>




---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/



--
Brett Payne-Rhodes
Eaglehawk Computing
t: +61 (0)8 9371-0471
f: +61 (0)8 9371-0470
m: +61 (0)414 371 047
e: [EMAIL PROTECTED]
w: www.ehc.net.au


--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to