Consumers may be finding ways to dodge the gas pump these days, but they aren't quite ready to give up their convenience-store purchases, as seen in fourth-quarter results from Casey's General Stores (NASDAQ:CASY). The company posted earnings per share of $0.28, beating analyst estimates and sending the shares up 12% today.

Total quarterly sales improved 20% on growth in Casey's three key categories: gasoline, prepared foods, and in-store grocery sales. Same-store sales also grew nicely in every category except gas, with higher prices sending that number down by 2%. Gasoline margins continued their steady trend downward, reaching 12.6 cents in the quarter.

Gas accounts for the bulk of Casey's sales, but most of the chain's profit comes from inside the convenience store, where gross margins reached an impressive 62.3% for lucrative fountain drinks and prepared food, for which same-store sales grew 11.2% in the quarter. Although the numbers for groceries were far behind, the company managed 3.6% growth in same-store sales there and steady 33.1% gross margins.

So people still need to fill up their gas tanks. That means plenty of customers still show up for Casey's to hawk its high-margin food and drinks to. It's a challenging time, as quarterly earnings fell year over year, but Casey's still managed 33.6% full-year earnings growth (on a continuing basis) on strong sales, cost controls, and its strategy of buying smaller mom-and-pop convenience stores across the Midwest.

Archrival The Pantry (NASDAQ:PTRY) pursues a similar strategy in the Southeast, but is feeling the pinch more than Casey's thanks to more aggressive buying in recent years. Given Casey's surprisingly strong results to top off the year, I still find it the stronger of the two, but high commodity prices will continue to hold back its prospects. Like others in the Foolish community, I'll argue that we're seeing signs of a commodity bubble, but can't even begin to surmise when it might start to deflate.

That may not matter to Casey's because it's proving it can survive in nearly any economic environment. Its rural focus also helps -- roughly 70% of its stores are in towns with fewer than 5,000 residents. This helps keep it out of the clutches of convenience-store rivals such as ExxonMobil (NYSE:XOM) and alternative places to grab a quick bite, be it McDonald's (NYSE:MCD), Burger King (NYSE:BKC), or even almighty Wal-Mart (NYSE:WMT), which can't easily compete in such small locales.

Related Foolishness: