How to edit string? How to add text to string?

I do have buttons 1-9 and they should add number to string when button is pressed, I just don’t have any idea how to do that, I tried int variable and It works with buttons, but how to add numbers to string?

Something like that, if button 1 is pressed then add 1 and when pressed button again add number after 1. etc. Also how to clear string?

var password="";
         var passwordUser="";
    
         var passwordTest : int;
        
        //var script:doorScript;
        //var passwLight:lightIntensity;//script
        
        function OnGUI(){
        GUI.Label(new Rect(Screen.width/2 - 75, Screen.height - 120, 150, 30), "Password:"+passwordUser);
        }
        //}
        
        function Button1 (){
        	animation.Play("nappi1");
        	passwordTest++;
      
        }

i hope this is what you want:

int number = 1;

Debug.Log(string.Format("blabla: {0}", number));
Debug.Log("blabla: "+number.ToString());

or if you wanted something like “test111”;
you can just do:

int number = 1;  
string numbertext = "";
numbertext = numbertext+ number.ToString(); //to add number  
Debug.Log("blabla: "+numbertext); //to combine  
numbertext = ""; //to clear;