# osu-file-parser

crates.io Documentation

A crate to parse an osu! beatmap file.

How to use

```rust use osufileparser::*;

let osufilestr = includestr!("./tests/osufiles/files/acidrain.osu"); // parse the .osu file let mut osufile = osufilestr.parse::().unwrap();

let osbstr = includestr!("./tests/osufiles/files/acidrain.osb"); // .osb file can also be parsed and appended to the OsuFile instance osufile.appendosb(osb_str).unwrap();

// you can use assert_eq_osu_str to assert that the parsed .osu file is equal to the original .osu file asserteqosustr(&osufile.tostring(), osufilestr); asserteqosustr(&osufile.osbtostring().unwrap(), osbstr); ```

General information

Alternative traits

Errors