Well, it seems like this approach actually works for Strings.