# String manipulation - appending

**URL:** <https://forum.kirupa.com/t/string-manipulation-appending/8782>\
**Category:** Uncategorized\
**Created:** [November 28, 2002, 12:21pm UTC](https://forum.kirupa.com/t/string-manipulation-appending/8782 "2002-11-28T12:21:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![j0se](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/j0se/32/44_2.png) [@j0se](https://forum.kirupa.com/u/j0se)\
**Post date:** [November 28, 2002, 12:21pm UTC](https://forum.kirupa.com/t/string-manipulation-appending/8782/1 "2002-11-28T12:21:54Z")

</div>

hello all,

i have a variable (myString) that takes in a string (e.g. “testfile”)

and i want to change that string to read: “testfile.txt”

and i don’t know where to begin  
☹

will this lurning curve ever stop?  
please?  
=)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 28, 2002, 12:35pm UTC](https://forum.kirupa.com/t/string-manipulation-appending/8782/2 "2002-11-28T12:35:03Z")

</div>

Well, the + operator is overloaded to work with strings.  
So

```auto
myString="testfile";
myString+=".txt";
trace (myString);

```

will return testfile.txt

pom 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 28, 2002, 12:59pm UTC](https://forum.kirupa.com/t/string-manipulation-appending/8782/3 "2002-11-28T12:59:52Z")

</div>

god! i really didn’t think hard enough about that (i prob wouldn’t have solved it, but i should have come close)

cheers!!  
🙂

PS there’s no blushing icon!=)
