{"id":22742440,"url":"https://github.com/discretetom/in_str","last_synced_at":"2025-10-14T12:49:59.994Z","repository":{"id":263821735,"uuid":"891491202","full_name":"DiscreteTom/in_str","owner":"DiscreteTom","description":"A procedural macro to generate a closure that checks if a character is in the provided literal string.","archived":false,"fork":false,"pushed_at":"2025-02-02T03:48:00.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-14T12:49:59.019Z","etag":null,"topics":["rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DiscreteTom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-20T12:36:32.000Z","updated_at":"2025-02-02T03:48:04.000Z","dependencies_parsed_at":"2025-02-05T06:35:06.386Z","dependency_job_id":"a54ca834-4df0-42fe-95dd-b3eb4b9edd4e","html_url":"https://github.com/DiscreteTom/in_str","commit_stats":null,"previous_names":["discretetom/in_str"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/DiscreteTom/in_str","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscreteTom%2Fin_str","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscreteTom%2Fin_str/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscreteTom%2Fin_str/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscreteTom%2Fin_str/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DiscreteTom","download_url":"https://codeload.github.com/DiscreteTom/in_str/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscreteTom%2Fin_str/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018576,"owners_count":26086579,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["rust"],"created_at":"2024-12-11T00:39:43.761Z","updated_at":"2025-10-14T12:49:59.967Z","avatar_url":"https://github.com/DiscreteTom.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `in_str!`\n\n![license](https://img.shields.io/github/license/DiscreteTom/in_str?style=flat-square)\n[![Crates.io Version](https://img.shields.io/crates/v/in_str?style=flat-square)](https://crates.io/crates/in_str)\n[![docs.rs](https://img.shields.io/docsrs/in_str?style=flat-square)](https://docs.rs/in_str/)\n\nA procedural macro to generate a closure that checks if a character is in the provided literal string.\n\n## Installation\n\n```bash\ncargo add in_str\n```\n\n## Usage\n\n```rust\nuse in_str::in_str;\n\nlet _ = in_str!(\"abc\");\n// equals to\nlet _ = |c: char| matches!(c, 'a' | 'b' | 'c');\n// usually faster than\nlet _ = |c: char| \"abc\".contains(c);\n\n// escape will be handled automatically\nlet _ = in_str!(\"\\n\\u{10ffff}\");\n// equals to\nlet _ = |c: char| matches!(c, '\\n' | '\\u{10ffff}');\n\n// also works with byte strings\nlet _ = in_str!(b\"abc\");\n// equals to\nlet _ = |c: u8| matches!(c, b'a' | b'b' | b'c');\n// escape will be handled automatically\nlet _ = in_str!(b\"\\n\\xff\");\n// equals to\nlet _ = |c: u8| matches!(c, b'\\n' | 0xff);\n```\n\n## [Documentation](https://docs.rs/in_str/)\n\n## [CHANGELOG](./CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscretetom%2Fin_str","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscretetom%2Fin_str","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscretetom%2Fin_str/lists"}