Are there C++ equivalents of sscanf and sprintf functions that takes a pointer to the C++ string class as the argument?

Also what's the C++ equivalent of printf to do formatted output? Thanks!