$iscaps - % of capital or lowercase
mIRC Code
+ 0 likes
Please Register to submit score.
| Average Score | 6.0 |
| Scores Submitted | 3 |
| Date Added | Jun 07, 2008 |
| Last Updated | Aug 27, 2008 |
| Tags | capital iscaps isid lowercase percent prop regex |
|
|
Introduction
Update: Removed variables and placed $regex inside $calc itself. Also made the % optional for each version. ( June 9th '08 )
Update: Redid the code a bit to make it shorter and easier to use. ( August 27th '08 )
;http://www.hawkee.com/snippet/3325/ ( based off of )
;--- Usage ----------------
;--- $iscaps(string).u <-- %caps
;--- $iscaps(string).up <-- %caps /w % after number
;--- $iscaps(string).l <-- %lowercase
;--- $iscaps(string).lp <-- %lowercase /w % after number
;--- $iscaps(string) <-- %caps , %lowercase
;--- $iscaps(string).p <-- %caps , %lowercase /w % after numbers
;--------------------------
mIRC Snippet:
$iscaps - % of capital or lowercase
Posted on Jun 7, 2008 10:37 pm
Posted on Jun 7, 2008 10:37 pm
Nice work Scakk.`-.-´
mIRC Snippet:
$iscaps - % of capital or lowercase
Posted on Jun 8, 2008 12:16 pm
Posted on Jun 8, 2008 12:16 pm
Nice work also.
You say in introduction the usage is:
$iscaps().ul
But in the script it seems as though the usage for that is just $iscaps()
You say in introduction the usage is:
$iscaps().ul
But in the script it seems as though the usage for that is just $iscaps()
mIRC Snippet:
$iscaps - % of capital or lowercase
Posted on Jun 8, 2008 12:34 pm
Posted on Jun 8, 2008 12:34 pm
It was .ul at one time but later I changed to not need that. Got it correct in the snippet itself. Changed it in the introduction part now. Thanks for the heads up.
mIRC Snippet:
$iscaps - % of capital or lowercase
Posted on Jun 8, 2008 11:28 pm
Posted on Jun 8, 2008 11:28 pm
Eh, it works at the very least, but the coding is not really stunning. Perhaps only declare variables once? Also, there are some letters you are missing support for (A-ZŠŒŽÀ-ÖØ-ÞŸ).
Now besides the coding: I find that adding a % to the end of the returned value is completely useless. What if I wanted to use this for a caps kicker? I'd have to use $remove or $left or so.
But in any case, this is a nice example of regex and how it can be used. Perhaps add a .count property to return the total matches (basically without a percentage)? Good luck.
Now besides the coding: I find that adding a % to the end of the returned value is completely useless. What if I wanted to use this for a caps kicker? I'd have to use $remove or $left or so.
But in any case, this is a nice example of regex and how it can be used. Perhaps add a .count property to return the total matches (basically without a percentage)? Good luck.
mIRC Snippet:
$iscaps - % of capital or lowercase
Posted on Jun 9, 2008 1:25 am
Posted on Jun 9, 2008 1:25 am
Damn it, this is great.
I really want to learn regex but not sure how :(
I really want to learn regex but not sure how :(
mIRC Snippet:
$iscaps - % of capital or lowercase
Posted on Jun 9, 2008 1:37 am
Posted on Jun 9, 2008 1:37 am
mIRC Snippet:
$iscaps - % of capital or lowercase
Posted on Jun 9, 2008 4:52 am
Posted on Jun 9, 2008 4:52 am
Bahamut: Varaiables are now more as I have placed the $regex itself inside the $calc. Also made the % option for each version.
mIRC Snippet:
$iscaps - % of capital or lowercase
Posted on Jun 11, 2008 11:21 am
Posted on Jun 11, 2008 11:21 am
Much neater now as you said on IRC! I think it deserves a higher rating now, great work!






