Sign in to follow this  
Followers 0
Kivin

Spleet Variable

6 posts in this topic

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

...illustrates that there is more than one way to skin a cat, although I have little use for a skinned cat.


[size="1"][font="Arial"].[u].[/u][/font][/size]

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