d0n Posted February 6, 2008 Share Posted February 6, 2008 what command should i look at if i want to count the number of upper case letter within a string? Link to comment Share on other sites More sharing options...
Developers Jos Posted February 6, 2008 Developers Share Posted February 6, 2008 Should be possible with StringReplace()... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 6, 2008 Share Posted February 6, 2008 Hi, Global $test = "Hello WOrld" MsgBox(0,"",_getCountUpperChars($test)) Func _getCountUpperChars($string) Local $count = StringRegExp($string, '[A-Z]', 3) If @error Then Return 0 Return UBound($count) EndFunc ;==>_getCountUpperChars Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
d0n Posted February 6, 2008 Author Share Posted February 6, 2008 wow that was quick, thanks Link to comment Share on other sites More sharing options...
Valuater Posted February 6, 2008 Share Posted February 6, 2008 Another approach... Local $Count = 0 $String = "This is a Test for Autoit String Results" $Split = StringSplit($String, "") For $x = 1 To $Split[0] If StringIsUpper($Split[$x]) Then $Count += 1 Next MsgBox(0x0, "Counter", "String uppercase count is: " & $Count & " ") Although, StringRegExpress is a better way ( many here dont know how to use it!!!... 8) Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 6, 2008 Share Posted February 6, 2008 wow that was quick, thanksWelcome! Never needed something like that before Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now