Expand description
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);
Modules§
- mapping
UNICODE_MAP
for bidirectional mapping between classpad character codes and unicode characters.
Structs§
- Classpad
String - A string that can be stored into an XCP file for the classpad.
- XCPFile
- An XCP file.
Enums§
- Classpad
Char - Represents a character from the classpad’s character code table.
- XCPFile
Type - The XCP file’s file type. Currently, only text files are supported.