String attractors and combinatorics on words