{"id":16867542,"url":"https://github.com/chrisduerr/rfind_url","last_synced_at":"2025-04-11T10:16:45.923Z","repository":{"id":57660839,"uuid":"176034932","full_name":"chrisduerr/rfind_url","owner":"chrisduerr","description":"Parser to search strings for URLs in reverse order","archived":false,"fork":false,"pushed_at":"2019-10-07T18:34:14.000Z","size":43,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T07:03:50.245Z","etag":null,"topics":["parser","reverse","rust","stream","url"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisduerr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-16T23:17:30.000Z","updated_at":"2021-03-22T21:47:51.000Z","dependencies_parsed_at":"2022-09-08T01:10:40.345Z","dependency_job_id":null,"html_url":"https://github.com/chrisduerr/rfind_url","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisduerr%2Frfind_url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisduerr%2Frfind_url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisduerr%2Frfind_url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisduerr%2Frfind_url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisduerr","download_url":"https://codeload.github.com/chrisduerr/rfind_url/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248269642,"owners_count":21075783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parser","reverse","rust","stream","url"],"created_at":"2024-10-13T14:54:45.533Z","updated_at":"2025-04-11T10:16:45.884Z","avatar_url":"https://github.com/chrisduerr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reverse Find URL\n\n[![Build Status](https://travis-ci.org/chrisduerr/rfind_url.svg?branch=master)](https://travis-ci.org/chrisduerr/rfind_url)\n[![crates.io](https://meritbadge.herokuapp.com/rfind_url)](https://crates.io/crates/rfind_url)\n\nThis crate provides a parser to search a string for URLs **in reverse order**.\n\nAll functionality is handled by the\n[`Parser`](https://docs.rs/rfind_url/*/rfind_url/struct.Parser.html) struct which takes\n[`chars`](https://doc.rust-lang.org/std/primitive.char.html) as input.\n\n# Examples\n\nText can be fed into the parser in reverse order:\n\n```rust\nuse rfind_url::{Parser, ParserState};\n\nlet mut parser = Parser::new();\n\nfor c in \"There_is_no_URL_here\".chars().rev() {\n    assert_eq!(parser.advance(c), ParserState::MaybeUrl);\n}\n```\n\nThe parser returns the length of the URL as soon as the last character of the URL is pushed into\nit. Otherwise it will return\n[`None`](https://doc.rust-lang.org/std/option/enum.Option.html#variant.None):\n\n```rust\nuse rfind_url::{Parser, ParserState};\n\nlet mut parser = Parser::new();\n\n// Parser guarantees there's currently no active URL\nassert_eq!(parser.advance(' '), ParserState::NoUrl);\n\n// URLs are only returned once they are complete\nfor c in \"ttps://example.org\".chars().rev() {\n    assert_eq!(parser.advance(c), ParserState::MaybeUrl);\n}\n\n// Parser has detected a URL spanning the last 19 characters\nassert_eq!(parser.advance('h'), ParserState::Url(19));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisduerr%2Frfind_url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisduerr%2Frfind_url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisduerr%2Frfind_url/lists"}