{"id":16406794,"url":"https://github.com/terror/anagram","last_synced_at":"2025-10-26T17:31:47.141Z","repository":{"id":57487780,"uuid":"342396254","full_name":"terror/anagram","owner":"terror","description":"Anagrams are cool","archived":false,"fork":false,"pushed_at":"2021-03-17T17:59:53.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-06T16:54:01.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crates.io/crates/anagram","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terror.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-25T22:29:01.000Z","updated_at":"2023-03-07T18:37:45.000Z","dependencies_parsed_at":"2022-08-29T11:21:48.888Z","dependency_job_id":null,"html_url":"https://github.com/terror/anagram","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terror%2Fanagram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terror%2Fanagram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terror%2Fanagram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terror%2Fanagram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terror","download_url":"https://codeload.github.com/terror/anagram/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238375286,"owners_count":19461576,"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":[],"created_at":"2024-10-11T06:10:59.740Z","updated_at":"2025-10-26T17:31:46.824Z","avatar_url":"https://github.com/terror.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## anagram\n\n[![crates.io](https://shields.io/crates/v/anagram.svg)](https://crates.io/crates/anagram)\n![Build and Test](https://github.com/terror/anagram/actions/workflows/rust.yml/badge.svg)\n\nA collection of anagram utility functions\n\n## Installation\n\nYou can install this crate by adding it to your Cargo.toml file\n```\nanagram = \"0.3.0\"\n```\n\n## Examples\n\n```rust\nuse anagram::{count, get_next, is_anagram, occurences};\n\nfn main() {\n  // count how many anagrams can be formed from a given word\n  let anagram_count = count(\"ordeals\");\n  assert_eq!(anagram_count, 5040);\n\n  // count the number of occurences of an anagram in a given word\n  let occur = occurences(\"helloworldhello\", \"ll\");\n  assert_eq!(occur, 2);\n\n  // check if a word is an anagram of another word\n  let ok = is_anagram(\"rustiscool\", \"oolcsistru\");\n  assert_eq!(ok, true);\n\n  // get the next lexicographically greater anagram\n  let next = get_next(\"abcdefg\");\n  assert_eq!(next, \"abcdegf\");\n\n  // get all anagrams of a word\n  let mut word: String = String::from(\"abc\");\n  for _ in 0..count(\u0026word) {\n    // get next anagram\n    word = get_next(\u0026word);\n    println!(\"{}\", word);\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterror%2Fanagram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterror%2Fanagram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterror%2Fanagram/lists"}