Skip to content

Commit

Permalink
Made rip number conversion public.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrueger committed Jan 24, 2025
1 parent 8a1281d commit 19279c9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/icy_engine/src/parsers/rip/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ use super::{ansi, BufferParser};
use crate::{ansi::EngineState, Buffer, CallbackAction, Caret, EngineResult, ParserError, Rectangle, Size};

pub mod bgi;
pub mod commands;
pub use commands::*;
mod commands;

#[cfg(test)]
mod tests;
Expand Down Expand Up @@ -416,7 +415,7 @@ impl BufferParser for Parser {
}
}

fn to_base_36(len: usize, number: i32) -> String {
pub fn to_base_36(len: usize, number: i32) -> String {
let mut res = String::new();
let mut number = number;
for _ in 0..len {
Expand All @@ -429,7 +428,7 @@ fn to_base_36(len: usize, number: i32) -> String {
res
}

fn parse_base_36(number: &mut i32, ch: char) -> EngineResult<()> {
pub fn parse_base_36(number: &mut i32, ch: char) -> EngineResult<()> {
if let Some(digit) = ch.to_digit(36) {
*number = *number * 36 + digit as i32;
Ok(())
Expand Down

0 comments on commit 19279c9

Please sign in to comment.