Multiply a string by a number! There was a challenge up a while ago about multiplying strings.  It showed us how we can multiply not only numbers, but also strings.  However, we still can't multiply a number by a string properly.  There has been one attempt to do so but this is obviously wrong.  We need to fix that!

Your Task:

Write a function or program that multiplies two inputs, a string and an integer.  To (properly) multiply an string by an integer, you split the string into characters, repeat each character a number of times equal to the integer, and then stick the characters back together. If the integer is negative, we use its absolute value in the first step, and then reverse the string. If the input is 0, output nothing (anything multiplied by 0 equals nothing).  

Input:

A string that consists solely of printable ASCII characters and newlines, and an integer (possible negative).  

Output:

The string multiplied by the integer.  

Examples:

Hello World!, 3            --&gt; HHHeeellllllooo   WWWooorrrlllddd!!!
foo, 12                    --&gt; ffffffffffffoooooooooooooooooooooooo
String, -3                 --&gt; gggnnniiirrrtttSSS
This is a fun challenge, 0 --&gt; 
Hello
World!, 2                  --&gt; HHeelllloo

                               WWoorrlldd!!


Scoring:

This is code-golf, lowest byte count wins!
Jelly, 6 5 4 bytes

²Ɠxm


Try it online!

How it works

²Ɠxm  Main link. Argument: n (integer)

²     Yield n².
 Ɠ    Read and eval one line of input. This yields a string s.
  x   Repeat the characters of s in-place, each one n² times.
   m  Takes each |n|-th character of the result, starting with the first if n &gt; 0, 
      the last if n &lt; 0.