设置缓冲区内容 / Set buffer content Args: value: 字符串或字节数据 / String or bytes data Returns: bool: 是否成功 / Whether successful
(self, value: Union[str, bytes])
| 46 | return ctypes.string_at(buff, sz).decode() |
| 47 | |
| 48 | def set(self, value: Union[str, bytes]) -> bool: |
| 49 | """设置缓冲区内容 / Set buffer content |
| 50 | |
| 51 | Args: |
| 52 | value: 字符串或字节数据 / String or bytes data |
| 53 | |
| 54 | Returns: |
| 55 | bool: 是否成功 / Whether successful |
| 56 | """ |
| 57 | if isinstance(value, str): |
| 58 | value = value.encode() |
| 59 | return bool(Library.framework().MaaStringBufferSetEx(self._handle, value, len(value))) |
| 60 | |
| 61 | @property |
| 62 | def empty(self) -> bool: |
no test coverage detected