{"id":16009455,"url":"https://github.com/figsoda/expand","last_synced_at":"2025-04-05T02:24:27.333Z","repository":{"id":43096003,"uuid":"306656779","full_name":"figsoda/expand","owner":"figsoda","description":"Rust library that introduces a macro to expand byte string and string literals","archived":false,"fork":false,"pushed_at":"2023-09-05T00:59:01.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-10T19:06:47.536Z","etag":null,"topics":["byte-string","bytestring","hacktoberfest","macro","macros","pattern","patterns","proc-macro","rust","string"],"latest_commit_sha":null,"homepage":"https://docs.rs/expand","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/figsoda.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}},"created_at":"2020-10-23T14:12:12.000Z","updated_at":"2023-05-30T19:16:44.000Z","dependencies_parsed_at":"2023-01-30T19:30:37.461Z","dependency_job_id":null,"html_url":"https://github.com/figsoda/expand","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figsoda%2Fexpand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figsoda%2Fexpand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figsoda%2Fexpand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figsoda%2Fexpand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/figsoda","download_url":"https://codeload.github.com/figsoda/expand/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247277522,"owners_count":20912539,"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":["byte-string","bytestring","hacktoberfest","macro","macros","pattern","patterns","proc-macro","rust","string"],"created_at":"2024-10-08T13:02:14.940Z","updated_at":"2025-04-05T02:24:26.939Z","avatar_url":"https://github.com/figsoda.png","language":"Rust","readme":"# expand\n\n[![version](https://img.shields.io/crates/v/expand?logo=rust\u0026style=flat-square)](https://crates.io/crates/expand)\n[![deps](https://deps.rs/repo/github/figsoda/expand/status.svg?style=flat-square\u0026compact=true)](https://deps.rs/repo/github/figsoda/expand)\n[![license](https://img.shields.io/badge/license-MPL--2.0-blue?style=flat-square)](https://www.mozilla.org/en-US/MPL/2.0)\n[![ci](https://img.shields.io/github/actions/workflow/status/figsoda/expand/ci.yml?label=ci\u0026logo=github-actions\u0026style=flat-square)](https://github.com/figsoda/expand/actions?query=workflow:ci)\n\nMacro to expand byte string and string literals\n\n[Documentation](https://docs.rs/expand)\n\n\n## Usage\n\n```rust\nuse expand::expand;\n\n// expanding a byte string\nassert_eq!(\n    \u0026expand!([@b\"Hello,\", b' ', @b\"world\", b'!']),\n    b\"Hello, world!\"\n);\n\n// expanding a string\nassert_eq!(\n    expand!(vec![@\"Hello,\", ' ', @\"world\", '!']),\n    \"Hello, world!\".chars().collect::\u003cVec\u003cchar\u003e\u003e(),\n);\n\n// pattern matching\nif let expand!([@b\"patt\", x, y, b'n', ..]) = b\"pattern matching\" {\n    assert_eq!(x, \u0026b'e');\n    assert_eq!(y, \u0026b'r');\n} else {\n    panic!(\"pattern matching failed\");\n}\n\n// more pattern matching\nif let expand!([@b\"msg = \\\"\", xs @ .., b'\"']) = br#\"msg = \"Hello, world!\"\"# {\n    assert_eq!(xs, b\"Hello, world!\");\n} else {\n    panic!(\"pattern matching failed\");\n}\n```\n\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigsoda%2Fexpand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffigsoda%2Fexpand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigsoda%2Fexpand/lists"}