Sign in to follow this  
Followers 0
BALA

Detecting caps in string

3 posts in this topic

Is there a way I can detect whether a certain string I define? For example, if I define "Hi" as the string, it would be able to tell that 'H' is uppercase, while 'i' is lowercase.


[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

StringIsUpper()

StringIsLower()

using '==' instead of '=' in a comparison

Share this post


Link to post
Share on other sites

Is there a way I can detect whether a certain string I define? For example, if I define "Hi" as the string, it would be able to tell that 'H' is uppercase, while 'i' is lowercase.

To test just the first character without knowing ahead of time what it will be:

While 1
    $String = InputBox("Test", "Input string:", "")
    If @error Or $String = "" Then Exit
    If StringIsUpper(StringLeft($String, 1)) Then
        MsgBox(64, "Test", "Capitalized.", 5)
    Else
        MsgBox(16, "Text", "Not capitalized.", 5)
    EndIf
WEnd

:shocked:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0