Finished adding method
Rust Build / Rustfmt (pull_request) Failing after 33s
Rust Build / Check (pull_request) Failing after 39s
Rust Build / Test Suite (pull_request) Failing after 32s
Rust Build / Clippy (pull_request) Failing after 47s
Rust Build / build (pull_request) Failing after 58s
Rust Build / Rustfmt (pull_request) Failing after 33s
Rust Build / Check (pull_request) Failing after 39s
Rust Build / Test Suite (pull_request) Failing after 32s
Rust Build / Clippy (pull_request) Failing after 47s
Rust Build / build (pull_request) Failing after 58s
This commit is contained in:
+18
-18
@@ -65,6 +65,24 @@ impl NumberParser {
|
|||||||
|
|
||||||
parsed
|
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
|
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