Sign in to follow this  
Followers 0
jarjarbinx1979

Help within string

3 posts in this topic

Sorry if this dumb question, but I have worked on an AUTO IT script for user administation within AD for the past couple of weeks, I am at the "clean up" stage and I need to find out how I can change a string format from all lowercase or uppercase to the first letter uppercase and the rest to lowercase - , example

JARJARBINX = Jarjarbinx

I have read the help files but I seem to be going round in circles....can anyone help?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

probably many ways to do it

$var = StringSplit(StringLower("JARJARBINX"),"")
$var2 = ""
$var2 = StringUpper($var[1])
For $x = 2 To $var[0]
    $var2 = $var2 & $var[$x]
Next
MsgBox(0, "String converted:", $var2)
oÝ÷ Ù«­¢+Ø(ÀÌØíÙÈôMÑÉ¥¹1½ÝÈ ÅÕ½Ðí)I)I %9`ÅÕ½Ðì¤(ÀÌØíÙÈôMÑÉ¥¹UÁÁÈ¡MÑÉ¥¹5¥ ÀÌØíÙȰİĤ¤µÀìMÑÉ¥¹5¥ ÀÌØíÙȰȱMÑÉ¥¹1¸ ÀÌØíÙȤ´Ä¤)5Í ½à À°ÅÕ½ÐíMÑÉ¥¹½¹ÙÉÑèÅÕ½Ðì°ÀÌØíÙȤ(
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

probably many ways to do it

$var = StringSplit(StringLower("JARJARBINX"),"")
$var2 = ""
$var2 = StringUpper($var[1])
For $x = 2 To $var[0]
    $var2 = $var2 & $var[$x]
Next
MsgBox(0, "String converted:", $var2)
oÝ÷ Ù«­¢+Ø(ÀÌØíÙÈôMÑÉ¥¹1½ÝÈ ÅÕ½Ðí)I)I %9`ÅÕ½Ðì¤(ÀÌØíÙÈôMÑÉ¥¹UÁÁÈ¡MÑÉ¥¹5¥ ÀÌØíÙȰİĤ¤µÀìMÑÉ¥¹5¥ ÀÌØíÙȰȱMÑÉ¥¹1¸ ÀÌØíÙȤ´Ä¤)5Í ½à À°ÅÕ½ÐíMÑÉ¥¹½¹ÙÉÑèÅÕ½Ðì°ÀÌØíÙȤ(

Thanks gafrost that was what I was after!

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