TWTRSEWordRangeCalculator Protocol Reference

Declared in TWTRSEWordRangeCalculator.h

– wordRangeForIndex: required method

find a “word” in this string based on canonical boundaries

- (NSRange)wordRangeForIndex:(NSInteger)index

Parameters

index

location around which to look for a ‘word’ used in the Text of a Tweet

Return Value

a range representing the “word” which contains index (nil if no Tweet Text ‘word’ token found)

Declared In

TWTRSEWordRangeCalculator.h

– wordRangeIncludingUnderscoreForIndex: required method

this function does the same thing as wordRangeForIndex:, but where ‘_’ is a valid character

- (NSRange)wordRangeIncludingUnderscoreForIndex:(NSUInteger)index

Parameters

index

location in this string around which to find a ‘word’ as a token

Return Value

the value represented by wordRangeForIndex: where ‘_’ is a valid character in the word at index

Declared In

TWTRSEWordRangeCalculator.h