(self, from_str)
| 36 | print(self.opencc) |
| 37 | |
| 38 | def convert(self, from_str): |
| 39 | result = "" |
| 40 | input_data = bytes(from_str, "UTF-8") |
| 41 | result_p = _libopencc.opencc_convert_utf8(self.opencc, input_data, len(input_data)) |
| 42 | print(result_p) |
| 43 | if result_p: |
| 44 | result = c_char_p(result_p).value.decode("UTF-8") |
| 45 | _libopencc.opencc_convert_utf8_free(result_p) |
| 46 | return result |
| 47 | |
| 48 | def get_error(self): |
| 49 | return _libopencc.opencc_error() |
no test coverage detected