Initializing empty string with spaces

Hi,

I want to Initialize a String with 50 spaces. I can do that by

ex: Var1=" "

But i dont want to do in this way?

Is there any unix command where i can specify no of spaces to a varaible?
like space(50)

var1=$( printf "%50s" " " )

In bash:

printf -v var1 "%50s" " "