(&self, idx: u16)
| 89 | } |
| 90 | |
| 91 | pub fn get_utf8_string(&self, idx: u16) -> Option<String> { |
| 92 | match self.get_utf8(idx) { |
| 93 | Some(bytes) => match String::from_utf8(bytes.clone()) { |
| 94 | Ok(string) => Some(string), |
| 95 | _ => None |
| 96 | }, |
| 97 | _ => None |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | pub fn find_ut8_index(&self, utf8: &'static str) -> Option<usize> { |
| 102 | for i in 0..self.constants.len() { |
no test coverage detected