A crate to parse an osu! beatmap file.
```rust use osufileparser::*;
let osufilestr = includestr!("./tests/osufiles/files/acidrain.osu");
// parse the .osu file
let mut osufile = osufilestr.parse::
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);
```
VersionedToString
, VersionedFromStr
and VersionedDefault
traits as replacements for the Display
, FromStr
and Default
traits.version
parameter to choose what version output to use.None
.Error
in those cases.Error
has methods that tells you where the error happened in the input string and what the error was.