Hi Bruno! > > > I was wondering if instead u8_wordbreaks() where the whole input string > > is processed looking for wordbreaks, it would be possible to have a new > > method to find just 'the next' wordbreak position. > > > > This would help cases where for example there's a maximum number of > > words to detect, as the whole string doesn't need to be processed. And > > also wouldn't therefore need allocation of a new array just to store the > > flags. > > This is a good suggestion. I'm considering to introduce new functions > extern size_t u8_wordbreak_next (const uint8_t *s, size_t n, size_t > startpos, bool inclusive); > extern size_t u8_wordbreak_prev (const uint8_t *s, size_t n, size_t endpos, > bool inclusive); > > I'm putting this on my TODO list. Thanks! >
Great! Thanks
