Jump to content

Spleet Variable


Recommended Posts

Hi everyone!

I just thinking, How can I spleet variable on parts?

For example:

$Variable = "123456789"
;Spleet
$Var1 = "1"
$Var2 = "23"
$Var3 = "3456"
$Var4 = "7"
$Var5 = "89"

Thanks for any idea.

Link to comment
Share on other sites

Maybe..

$Variable = "123456789"

$Split = StringSplit($Variable, "")

$Var1 = $Split[1]
$Var2 = $Split[2] & $Split[3]
$Var2 = $Split[3] & $Split[4] & $Split[5] & $Split[6]
$Var2 = $Split[7]
$Var2 = $Split[8] & $Split[9]

;Split the same as below
$Var1 = "1"
$Var2 = "23"
$Var3 = "3456"
$Var4 = "7"
$Var5 = "89"

8)

NEWHeader1.png

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...