{"id":20888006,"url":"https://github.com/canop/secular","last_synced_at":"2025-07-06T20:33:06.447Z","repository":{"id":45281030,"uuid":"253005743","full_name":"Canop/secular","owner":"Canop","description":"no diacr!","archived":false,"fork":false,"pushed_at":"2021-12-24T16:21:58.000Z","size":195,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-19T11:19:23.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Canop.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":"2020-04-04T13:36:08.000Z","updated_at":"2021-08-24T12:14:24.000Z","dependencies_parsed_at":"2022-08-04T13:15:29.436Z","dependency_job_id":null,"html_url":"https://github.com/Canop/secular","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/Canop%2Fsecular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Fsecular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Fsecular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Fsecular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Canop","download_url":"https://codeload.github.com/Canop/secular/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243268796,"owners_count":20263925,"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-11-18T08:23:45.581Z","updated_at":"2025-03-12T18:21:51.791Z","avatar_url":"https://github.com/Canop.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Secular\n\n[![MIT][s2]][l2] [![Latest Version][s1]][l1] [![Chat on Miaou][s3]][l3]\n\n[s1]: https://img.shields.io/crates/v/secular.svg\n[l1]: https://crates.io/crates/secular\n\n[s2]: https://img.shields.io/badge/license-MIT-blue.svg\n[l2]: LICENSE\n\n[s3]: https://miaou.dystroy.org/static/shields/room.svg\n[l3]: https://miaou.dystroy.org/3?broot\n\nProvide a lowercased diacritics-free version of a character or a string.\n\nFor example return `e` for `é`.\n\nSecular's char lookup is an inlined lookup of a static table, which means it's possible to use it in performance sensitive code.\n\nSecular also performs (optionally) Unicode normalization.\n\nA common use case for the removal of diacritics and some unicode arterfacts is to ease searches:\n\n![broot search](doc/broot-search.png)\n\n(diacritics ignoring normalized search in [broot](https://dystroy.org/broot): the user typed `rève`)\n\n## Declaration\n\nBy default, diacritics removal is only done on ascii chars, so to include a smaller table.\n\nIf you want to handle the whole BMP, use the \"bmp\" feature\" (the downside is that the binary is bigger as it includes a big map).\n\nDefault import:\n\n\t[dependencies]\n\tsecular = \"0.3\"\n\nFor more characters (the BMP):\n\n\t[dependencies]\n\tsecular = { version=\"0.3\", features=[\"bmp\"] }\n\nWith Unicode normalization functions (using the unicode-normalization crate):\n\n\t[dependencies]\n\tsecular = { version=\"0.3\", features=[\"normalization\"] }\n\nor\n\n\t[dependencies]\n\tsecular = { version=\"0.3\", features=[\"bmp\",\"normalization\"] }\n\nThis feature is optional so that you can avoid importing the unicode-normalization crate (note that it's used in many other crates so it's possible your text processing application already uses it).\n\n## Usage\n\nOn characters:\n\n```rust\nuse secular::*;\nlet s = \"Comunicações\"; // normalized string (length=12)\nlet chars: Vec\u003cchar\u003e = s.chars().collect();\nassert_eq!(chars.len(), 12);\nassert_eq!(chars[0], 'C');\nassert_eq!(lower_lay_char(chars[0]), 'c');\nassert_eq!(chars[8], 'ç');\nassert_eq!(lower_lay_char(chars[8]), 'c');\n```\n\nOn strings:\n\n```rust\nuse secular::*;\nlet s = \"Comunicações\"; // unnormalized string (length=14)\nassert_eq!(s.chars().count(), 14);\nlet s = normalized_lower_lay_string(s);\nassert_eq!(s.chars().count(), 12);\nassert_eq!(s, \"comunicacoes\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanop%2Fsecular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanop%2Fsecular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanop%2Fsecular/lists"}