You would be forgiven for thinking that there's little in this world more fickle than the fashion whims of teenagers -- although the recent clothing choices made by 20-year-old Miley Cyrus don't speak volumes for her generation, either. However, over the past year, Gap (GPS -1.12%) has somehow managed to maintain its hold on the group.

Meanwhile, competitors have been chasing after their core customers but failing to keep pace. Gap's long-term plans can therefore continue unhindered by any fears of falling market share. The days of wine and roses seem to be upon Gap. But even this rose has its thorns.

Gap's strengths and weakness
Second-quarter results were ugly across most of the sector, with many companies citing a challenging retail environment. That sentiment was part of a broader weakness in the retail sector. Wal-Mart, for instance, blamed its weak sales on lowered inflation and an increase in the payroll tax. Gap was one of the few retailers that were unhampered by that weakness.

The company increased comparable-store sales -- sales from stores open for more than a year -- by 5% over the second quarter last year. Comparable sales can help investors and analysts compare similar companies better than revenue growth, as pure revenue growth can be increased simply by opening more stores, with each location doing worse than it did in the previous year.

Gap's increase easily bested the efforts of companies like American Eagle (AEO -0.38%) and Aeropostale (AROPQ). Both companies had a fall in comparable-store sales compared to the previous year. American Eagle fell 7%, which management blamed on a fall in foot traffic and a failure to execute its women's apparel plan as it should have. Aeropostale fell 15%, also blaming weak traffic and an overly promotional retail environment.

Gap managed to dodge the worst of those issues, but it did have weakness in its Banana Republic stores. That brand had a 1% decline in year-over-year comparable sales, while the Gap and Old Navy brands both managed a 6% increase. Oddly, Banana Republic is the least teen-focused brand of the three, focusing instead on "workplace style" instead of trendy graphic T-shirts.

What comes next for Gap
The weakness that dragged the other companies into the mud skipped over Gap. Because it did have success in the second quarter, Gap is now looking toward the future with hopeful eyes instead of the dread that seems to be hanging over the competition. The company has launched a denim and chambray -- chambray is a lightweight fabric, often blue, used mainly in shirts -- campaign and is going to launch its first television marketing campaign in years this fall.

While Gap is having difficulty with the Banana Republic brand, everything else is ticking over nicely. With the push back to advertising and the company's continued focus on its core products, it should be well set for a solid end of 2013. You should be looking for good news from Gap's August sales, which will be released next week on Thursday. August is a big back-to-school month, and a good increase from Gap would be great news, and not unexpected. Right now, Gap seems to be the only company that really understands the teen market.