By considering a cigar-shaped trapping potential elongated in a proper curvilinear coordinate, we discover a new form of wave localization that arises from the interplay of geometry and topological protection. The potential is modulated in its shape such that local curvature introduces a trapping potential. The curvature varies along the trap curvilinear axis encodes a topological Harper modulation. The varying geometry maps our system in a one-dimensional Andre-Aubry-Harper grating. We show that a mobility edge exists with topologically protected states. These modes are extremely robust with respect to disorder in the shape of the string. The results may be relevant for localization phenomena in Bose-Einstein condensates, optical fibers and waveguides, and new laser devices, but also for fundamental studies on string theory. Taking into account that the one-dimensional modulation mimics the existence of an additional dimension, our system is the first example of a physically realizable five-dimensional string.