move this function to lib so we can use it elsewhere
This commit is contained in:
12
src/lib.rs
12
src/lib.rs
@@ -133,6 +133,18 @@ fn segments_from_string(string: String) -> Vec<String> {
|
||||
output
|
||||
}
|
||||
|
||||
// for some reason the sprites with numeric IDs go first,
|
||||
// then SPR A (avatar), then all the non-numeric IDs
|
||||
fn is_string_numeric(str: String) -> bool {
|
||||
for c in str.chars() {
|
||||
if !c.is_numeric() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::{from_base36, ToBase36, optional_data_line, mock, segments_from_string};
|
||||
|
||||
Reference in New Issue
Block a user