()
| 10 | // 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 |
| 11 | |
| 12 | fn main() { |
| 13 | let word = "abcdefd".to_string(); |
| 14 | let ch = 'd'; |
| 15 | println!("{:?}", reverse_prefix(word, ch)); |
| 16 | } |
| 17 | |
| 18 | pub fn reverse_prefix(word: String, ch: char) -> String { |
| 19 | let s_index = word.find(ch); |
nothing calls this directly
no outgoing calls
no test coverage detected