Add function to catenate n copies of a string

Change-Id: Iba203e18fea2a374e0e0b5c988012ee8fd5369e7