summaryrefslogtreecommitdiff
path: root/rust/findurl/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/findurl/src/main.rs')
-rw-r--r--rust/findurl/src/main.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/rust/findurl/src/main.rs b/rust/findurl/src/main.rs
new file mode 100644
index 0000000..1723df4
--- /dev/null
+++ b/rust/findurl/src/main.rs
@@ -0,0 +1,27 @@
+mod furl;
+
+fn main() {
+ let mut s = String::new();
+
+ loop {
+
+ match std::io::stdin().read_line(&mut s) {
+ Ok(n) => {
+ if n == 0 {
+ break;
+ }
+ }
+ Err(_) => panic!(),
+ }
+ }
+
+ let mut urls: Vec<String> = Vec::new();
+
+ furl::find_urls(&mut urls);
+
+ for i in &urls {
+ println!("{i}");
+ }
+
+ println!("{}", s);
+}