def find_next_word_ending(self, include_current_position=False, count=1, WORD=False):
        if include_current_position:
            text = self.text_after_cursor
        else:
            text = self.text_after_cursor[1:]

        regex = _FIND_BIG_WORD_RE if WORD else _FIND_WORD_RE
        iterable = regex.finditer(text)

        try:
            for i, match in enumerate(iterable):
                if i + 1 == count:
                    value = match.end(1)

                    if include_current_position:
                        return value
                    else:
                        return value + 1

        except StopIteration:
            pass
Decode response from client message
dataset/ETHPy150Open jonathanslenders/python-prompt-toolkit/prompt_toolkit/document.py/Document.find_next_word_ending--crossover with--dataset/ETHPy150Open hazelcast/hazelcast-python-client/hazelcast/protocol/codec/queue_contains_all_codec.py/decode_response