Add letters to string without 26 if-statements?

Hello, I’m trying to make an in-game search bar, but for that I would need every letter key pressed to be added on to the field. I know a way to do this, but I know that there is definitely a better way.

if (Input.GetKeyUp("a")){
   SearchField = SearchField + "a";
}

^Bad way to do this^

You want to use Input.inputString

This field contains a string consisting of all the ASCII keyboard characters the player has pressed this frame. It also includes backspace and newline characters, which you can check for and handle accordingly.