"The majority of rips will bring you back to the beach - don't struggle."
The advice over here is to swim at right angles to the rip (ie, parallel to the shore). When you're back in surf, head for the beach.
(I'd prefer not to wait and see if the rip brings me back. If it does, I might be dead already - if it doesn't, well, the outlook's not good!)
And always swim at a Life-guarded beach, especially if you're a visitor to the area.
EDIT: At least we don't get man-eating sharks off Cornwall. Basking sharks are huge, but they feed on krill.
Yes rynner2, I've never understood that - Britain is well known for it's Gulf Stream, which shares a connection to Equatorial Waters, has Basking sharks, yet none to very little representation of any harassment by 'Noahs'.
My experience with being caught in rips is, that by the time you've swum across the rip into 'still' waters, you're already far offshore, which will necessitate a long hard slog back, through maybe 4 to 5 lines of breakers in a very weakened state.
Best thing is to tread water and if on a patrolled beach, stick your hand up in the air, and wait for the 'Beachies' to come and get you.
Quite often, if the rip doesn't take you back to the beach, it will follow closely the line of the headland, which is easier, oftentimes, to clamber up on the rock platform and walk back to the beach.
At North Bondi (yep, that Bondi), there is/was a rip called the elevator, which a lot of grommets used to use to get out the back, behind the first line of breakers. It was handy for the transport, and also because there usually was very little surf to bash through to get 'out the back'.
But yes, the best way to swim is to swim at a patrolled beach, and always between the flags.