def _partition_input(self, current_string: str, abbr: typing.Optional[str]) -> typing.Tuple[str, str, str]:
if abbr:<EOL><INDENT>if self.ignoreCase:<EOL><INDENT>string_before, typed_abbreviation, string_after = self._case_insensitive_rpartition(<EOL>current_string, abbr<EOL>)<EOL>abbr_start_index = len(string_before)<EOL>abbr_end_index = abbr_start_index + len(typed_abbreviation)<EOL>typed_abbreviation = current_string[abbr_start_index:abbr_end_index]<EOL><DEDENT>else:<EOL><INDENT>string_before, typed_abbreviation, string_after = current_string.rpartition(abbr)<EOL><DEDENT>return string_before, typed_abbreviation, string_after<EOL><DEDENT>else:<EOL><INDENT>return "<STR_LIT>", current_string, "<STR_LIT>"<EOL><DEDENT>
Partition the input into text before, typed abbreviation (if it exists), and text after