Decimal Multiplication of Strings Given 2 inputs, a string and a decimal number, output the string multiplied by that number.

The catch is that the number can be a float or an integer.

You should output the string floor(n) time and then the first floor((n-floor(n))*len(string)) letters again.

Other notes:


The input will not always be a float, it may be an int. So 1.5, 1, and 1.0 are all possible.  It will always be in base 10 though, and if you wish an exception please comment.
The string input may contain whitespace, quotes and other characters.  No newlines or control chars though.
No built-ins for direct string repeating, even string multiplication like the python 'a'*5 are allowed.  However string addition is allowed.


Test cases:

The comma &amp; space separate the inputs.

test case, 1 -&gt; test case

case, 2.5 -&gt; casecaseca

(will add more later), 0.3333 -&gt; (will(space)

cats &gt;= dogs, 0.5 -&gt; cats &gt;


Final Note:

I am seeing a lot of answers that use builtin string multiplication or repeation functions.  This is not allowed.  @VTC's answer is valid though, because it does not multiply the string, only the float input.  So the definitive rule is: If it directly multiplies the string, you can't do it.
Java 7, 89
void g(char[]a,float b){for(int i=0,l=a.length;i&lt;(int)(l*b);)System.out.print(a[i++%l]);}

takes char[] and float and outputs to STDOUT. basic looping.