Edit: After some more research and experience, as well as a comment below, this isn't a 100% tell. It's "good enough" for most things, but I've seen charge-only cables with the USB logo and data cables missing the logo. It's pretty bad when a standard isn't standard.
I know this question is a little old, but I figured it out last night, I believe.
On the ends of a USB cable, there is normally the USB logo:
However, this is apparently missing on the "charge only" cords. After looking at 2-3 of them last night looking for a data cable, I realized that "fact". I don't know if that's a standard for all manufacturers, but I seriously doubt the random ones I was looking at were the same brand.
One of the cords with the missing logo had a paper flag/label that said it's only a charging cable, further qualifying that it does not transfer data.
Please post as a comment if you find this to be wrong. I'd like to hear other's results.