It does the same thing, properly escapes the desired domain, ensures that it’s NOT case sensitive ({HTTP_HOST} is NOT case sensitive but mod_rewrite’s regex is!) and there is no need to capture the {REQUEST_URI} in another variable.
As shown in my signature’s tutorial (and in the sticky posts in this board), all that code does is force www.example.com to be the domain in the location box of visiting browsers.