Checking if string exists.

Quick rundown;

Making Phone
Has Key Pad
Text Entry

When I press a number, what I would like for it to do is put the corresponding number in the text box, and if I press another it will push the current string aside and place in the one you just pressed.
How would I go about doing this?
Sorry If I made that sound 1000x more confusing then I should of.
Basically want it working like a calculator input.

Thank you in advance.

local string = “”

function AddNumber(mynumber)
string = tostring(mynumber)…string

Also, questions go in questions form.