Most WordPress functions, that generate output, do echo that output by them self. But all those functions are just wrappers for the accordingly get_*-functions.
In your case its bloginfo() and get_bloginfo(), where the second returns the output, so you can use it for whatever you like.