Jump to content

Help within string


Recommended Posts

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?

Link to comment
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ÑÉ¥¹½¹ÙÉÑèÅÕ½Ðì°ÀÌØíÙȤ(
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.

 

Link to comment
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!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...