allow non-16x16 rooms

This commit is contained in:
2020-04-28 19:30:18 +01:00
parent b2f601e778
commit 76eca72699
2 changed files with 24 additions and 2 deletions

View File

@@ -152,6 +152,28 @@ fn is_string_numeric(str: String) -> bool {
return true;
}
pub trait Quote {
fn quote(&self) -> String;
}
impl Quote for String {
#[inline]
fn quote(&self) -> String {
format!("\"\"\"\n{}\n\"\"\"", self).to_string()
}
}
pub trait Unquote {
fn unquote(&self) -> String;
}
impl Unquote for String {
#[inline]
fn unquote(&self) -> String {
self.trim_matches('\"').trim_matches('\n').to_string()
}
}
#[cfg(test)]
mod test {
use crate::{from_base36, ToBase36, optional_data_line, mock, segments_from_string};