Test code (possibly buggy) for translating indices returned in the App.net API to NSString ranges.