Jump to content

Append to an existing string


DJJ
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • Moderators

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.

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