Crates.io | classpad_string |
lib.rs | classpad_string |
version | 0.2.1 |
source | src |
created_at | 2023-09-29 02:27:24.421435 |
updated_at | 2023-09-29 02:43:45.563307 |
description | handle XCP files and strings for the Classpad fx-400 |
homepage | |
repository | https://github.com/Eisverygoodletter/classpad_string |
max_upload_size | |
id | 986961 |
size | 23,259 |
Read and write ClasspadString
s that can be stored in XCP files and loaded onto the CASIO Classpad fx-400.
This library provides the ClasspadChar
(a single classpad character), ClasspadString
, and XCPFile
.
Here is how you can write "this is some text" into a XCP file.
use classpad_string::*;
use std::str::FromStr;
let text = "this is some text";
let classpad_s = ClasspadString::from_str(text).unwrap();
let xcp = XCPFile {
file_type: XCPFileType::Text,
data: classpad_s,
folder_name: "main".to_string(),
var_name: "mytext".to_string()
};
let mut outputxcp = std::fs::File::create("mytext.xcp").unwrap();
xcp.write_to_file(&mut outputxcp);