xiangqi_tui 0.1.0

Chinese chess (Xiangqi) TUI client with UCI/UCCI engine and opening book support
1
2
3
4
5
6
7
8
//! 系统剪贴板(复制 FEN 等)。

pub fn copy_text(text: &str) -> Result<(), String> {
    arboard::Clipboard::new()
        .map_err(|e| format!("无法打开剪贴板:{e}"))?
        .set_text(text)
        .map_err(|e| format!("复制失败:{e}"))
}