Added replicate function.
Replicate function can output a string.