{"id":18812228,"url":"https://github.com/blobfolio/oxford_join","last_synced_at":"2025-09-25T15:29:00.854Z","repository":{"id":56899872,"uuid":"375237103","full_name":"Blobfolio/oxford_join","owner":"Blobfolio","description":"A Rust crate providing a trait to join string slices with Oxford Commas.","archived":false,"fork":false,"pushed_at":"2025-02-26T03:51:24.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T13:45:52.233Z","etag":null,"topics":["grammar","rust","string-concatenation"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Blobfolio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"Blobfolio"}},"created_at":"2021-06-09T05:32:09.000Z","updated_at":"2025-02-26T03:47:30.000Z","dependencies_parsed_at":"2024-11-07T23:32:27.162Z","dependency_job_id":"87cb4f7b-f07f-4e92-9a6c-f79c9ae0e911","html_url":"https://github.com/Blobfolio/oxford_join","commit_stats":{"total_commits":73,"total_committers":1,"mean_commits":73.0,"dds":0.0,"last_synced_commit":"3eec00ef3426b3f26e8706f375d43aed38881a2f"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Foxford_join","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Foxford_join/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Foxford_join/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blobfolio%2Foxford_join/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blobfolio","download_url":"https://codeload.github.com/Blobfolio/oxford_join/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782261,"owners_count":21160717,"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":["grammar","rust","string-concatenation"],"created_at":"2024-11-07T23:30:59.741Z","updated_at":"2025-09-25T15:29:00.834Z","avatar_url":"https://github.com/Blobfolio.png","language":"Rust","funding_links":["https://github.com/sponsors/Blobfolio"],"categories":[],"sub_categories":[],"readme":"# Oxford Join\n\n[![docs.rs](https://img.shields.io/docsrs/oxford_join.svg?style=flat-square\u0026label=docs.rs)](https://docs.rs/oxford_join/)\n[![changelog](https://img.shields.io/crates/v/oxford_join.svg?style=flat-square\u0026label=changelog\u0026color=9b59b6)](https://github.com/Blobfolio/oxford_join/blob/master/CHANGELOG.md)\u003cbr\u003e\n[![crates.io](https://img.shields.io/crates/v/oxford_join.svg?style=flat-square\u0026label=crates.io)](https://crates.io/crates/oxford_join)\n[![ci](https://img.shields.io/github/actions/workflow/status/Blobfolio/oxford_join/ci.yaml?style=flat-square\u0026label=ci)](https://github.com/Blobfolio/oxford_join/actions)\n[![deps.rs](https://deps.rs/crate/oxford_join/latest/status.svg?style=flat-square\u0026label=deps.rs)](https://deps.rs/crate/oxford_join/)\u003cbr\u003e\n[![license](https://img.shields.io/badge/license-wtfpl-ff1493?style=flat-square)](https://en.wikipedia.org/wiki/WTFPL)\n[![contributions welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\u0026label=contributions)](https://github.com/Blobfolio/oxford_join/issues)\n\nJoin a slice of strings with [Oxford Commas](https://en.wikipedia.org/wiki/Serial_comma) inserted as necessary, using the `Conjunction` of your choice.\n\n(You know, as it should be. Haha.)\n\nThe return formatting depends on the size of the set:\n\n```\n0: \"\"\n1: \"first\"\n2: \"first \u003cCONJUNCTION\u003e last\"\nn: \"first, second, …, \u003cCONJUNCTION\u003e last\"\n```\n\nThis crate is `#![no_std]`-compatible.\n\n## Examples\n\nThe magic is accomplished with the `OxfordJoin` trait. Import that, and most\nslice-y things holding `AsRef\u003cstr\u003e` will inherit the `OxfordJoin::oxford_join`\nmethod for joining.\n\n```rust\nuse oxford_join::{Conjunction, OxfordJoin};\n\nlet set = [\"Apples\", \"Oranges\"];\nassert_eq!(set.oxford_join(Conjunction::And), \"Apples and Oranges\");\n\nlet set = [\"Apples\", \"Oranges\", \"Bananas\"];\nassert_eq!(set.oxford_join(Conjunction::And), \"Apples, Oranges, and Bananas\");\n\n// There are also shorthand methods for and, or, and_or, and nor, allowing you\n// to skip the Conjunction enum entirely.\nassert_eq!(set.oxford_and(), \"Apples, Oranges, and Bananas\");\nassert_eq!(set.oxford_and_or(), \"Apples, Oranges, and/or Bananas\");\nassert_eq!(set.oxford_nor(), \"Apples, Oranges, nor Bananas\");\nassert_eq!(set.oxford_or(), \"Apples, Oranges, or Bananas\");\n```\n\nThat's all, folks!\n\n\n\n## Installation\n\nAdd `oxford_join` to your `dependencies` in `Cargo.toml`, like:\n\n```toml\n[dependencies]\noxford_join = \"0.7.*\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblobfolio%2Foxford_join","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblobfolio%2Foxford_join","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblobfolio%2Foxford_join/lists"}