# Quick hack for Python-like string mutiplication?

**URL:** https://forum.kirupa.com/t/quick-hack-for-python-like-string-mutiplication/297917
**Category:** flash
**Created:** [October 10, 2009, 8:51am UTC](https://forum.kirupa.com/t/quick-hack-for-python-like-string-mutiplication/297917 "2009-10-10T08:51:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![komapeb](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@komapeb](https://forum.kirupa.com/u/komapeb)
#### Post date: [October 10, 2009, 8:51am UTC](https://forum.kirupa.com/t/quick-hack-for-python-like-string-mutiplication/297917/1 "2009-10-10T08:51:44Z")

</div>

Is there a function in AS to allow me to multiply a string by _[SIZE=3] **x** [/SIZE]_. The function should return the string repeated _[SIZE=3] **x** [/SIZE]_ times.  
e.g.

```auto
var str:String = "string";
trace(str*3); //expected output: "stringstringstring"

```

---

<div class="post-metadata">

### Author: ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)
#### Post date: [July 25, 2020, 1:49pm UTC](https://forum.kirupa.com/t/quick-hack-for-python-like-string-mutiplication/297917/3 "2020-07-25T13:49:42Z")

</div>


