renamed find_word_end_node to find_string_end_node since prefix is not always a word