| 78 | text_string.make_ascii_uppercase(); |
| 79 | |
| 80 | let byte_idx = byte_index_from_char_index(self.as_str(), char_index); |
| 81 | |
| 82 | self.insert_str(byte_idx.into(), text_string.as_str()); |
| 83 | |
| 84 | text.chars().count() |
| 85 | } |
| 86 | |
| 87 | fn delete_char_range(&mut self, char_range: Range<egui::text::CharIndex>) { |
| 88 | assert!(char_range.start <= char_range.end); |
| 89 | |
| 90 | // Get both byte indices |
| 91 | let byte_start = byte_index_from_char_index(self.as_str(), char_range.start); |
| 92 | let byte_end = byte_index_from_char_index(self.as_str(), char_range.end); |
| 93 | |