Battery life is subjective as we all use our phones differently. For my personal use, yes the Galaxy Nexus had poor battery life, but that was mostly in part due to the poor quality radios used in the device, and it was an early 4g device as well, none of the earlier 4g phones had anywhere close to good battery life. Compared to the Nexus, my s4 can last me all day and I text a ton and use data a bit here and there. The main culprit to any phone is the screen, so the more you use your phone, the more battery it's going to drain. Second would be the data, so any use of it and background apps are real battery drainers as well.
However if you're opting for the s5, you can at least pick up a second battery (which I did when I first bought my s4) and swap it. For myself with two batteries, one is always fully charged and ready to go, but I've only found myself having to swap it out once and even then a car charger was an option.