Getting all blog ids, is there a function?

Hi, Not a support question as such, just some help from the 'advanced' community - before I code a database call I was looking for a function to return all blog ids in a network, cause generally there is a function for everything.

I assume a simple DB call like
$blogs = $wpdb->get_results("SELECT blog_id FROM wp_blogs");
but I'm loathed to code my own queries if standard functions exist.