Migrate #4
+18
-18
@@ -65,6 +65,24 @@ impl NumberParser {
|
||||
|
||||
parsed
|
||||
}
|
||||
|
||||
fn remove_some_data(&self, unparsed: &String) -> String {
|
||||
let mut parsed: String = String::new();
|
||||
|
||||
for (_, ch) in unparsed.chars().enumerate() {
|
||||
if ch == ' ' {
|
||||
continue;
|
||||
} else {
|
||||
if ch.is_numeric() {
|
||||
parsed.push(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
println!("Parsed: {parsed:?}");
|
||||
|
||||
parsed
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -170,23 +188,5 @@ func (prsr NumberParser) readLines(filename string) []string {
|
||||
|
||||
return lines
|
||||
}
|
||||
|
||||
func (prsr NumberParser) removeSomeData(unparsed string) string {
|
||||
parsed := ""
|
||||
|
||||
for _, ch := range unparsed {
|
||||
if ch == ' ' {
|
||||
continue
|
||||
} else {
|
||||
if unicode.IsDigit(ch) {
|
||||
parsed += string(ch)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
log.Println("Parsed:", parsed)
|
||||
|
||||
return parsed
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user