summaryrefslogtreecommitdiff
path: root/rust/findurl/src/main.rs
diff options
context:
space:
mode:
authorCarlos Maiolino <[email protected]>2026-02-20 16:17:14 +0100
committerCarlos Maiolino <[email protected]>2026-02-20 16:17:14 +0100
commit4ff0e42f65d8bba3d21bed53bfe1251d8db5c13f (patch)
tree9ac61873e2676c3f392bd26063afeb16897c3902 /rust/findurl/src/main.rs
parentfd313dd5ad9ac067a31f2b1760b85bd305567131 (diff)
extra codeHEADmaster
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);
+}