Hi, i need a function that gets a string and calculates it and then returns a integer.

For eksample if the string is "5+3" Then the function should return 8.

How can I make this. I guess someone has already done something like this before. Any tips, or codeexamples??
Thanks for help.