I have an imported dataset where I need to rename all of the variables and want to use the imported label as a part of the new name of the variables. The general idea of what I want to do is the following:

foreach var of varlist _all {
local varlabel : variable label `var'
local strN = "str" + `varlabel'
rename `var' `strN', if...

However, 'varlabel' is a number for each variable and so does not concactenate as it is an integer. To my knowledge Tostring would not work in this situation, and if it does I have been unable to figure out how. Any help on how to change the type of a local variable would be much appreciated. I've been scouring the internet for the past couple of hours to no success.