repeat Summary Repeats the character a specified number of times. Usage public string repeat(unsigned int times) Returns A string representing the repeated character. Parameters times The number of times to repeat the character. Description Repeats the character a specified number of times. Examples Creating Horizontal Line 1`-`.repeat(5); // "-----" Share HTML | BBCode | Direct Link