is there a str.repeat() method in Java?

Hi everybody!
i need to have a string repeated using a java script.. let's say i have this:

var txt = "a text "
var msg

msg = txt.repeat(2)

and i would like the output to be "a text a text", what method do i need to use in place of the repeat method? or what is the way to achieve this?

thank you very much!

just a sam7 -/-
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!