Jump to content
Sign in to follow this  
DJJ

Append to an existing string

Recommended Posts

DJJ

I have a string that I would like to append to.

Here are some strings:

$string1 = "hello"

$string2 = "world"

Here's what I'm trying to do:

$string3 = $string1 & $string2

$string3 = $string3 & $string2

For a desired output of:

helloworldworld

Any ideas? My "$string3 = $string3 &" idea doesn't appear to work.

Forgive me, I'm a noob.

Share this post


Link to post
Share on other sites
SmOke_N

Global $string1 = "Hello"
Global $string2 = "World"
Global $string3 = $string1 & $string2
$string3 &= $string2

ConsoleWrite($string3 & @CRLF)

Or

Global $string1 = "Hello"
Global $string2 = "World"
Global $string3 = $string1 & $string2
$string3 = $string3 & $string2

ConsoleWrite($string3 & @CRLF)
Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.