{"id":13642505,"url":"https://github.com/microsoft/bistring","last_synced_at":"2025-04-12T23:41:44.199Z","repository":{"id":41287789,"uuid":"190780587","full_name":"microsoft/bistring","owner":"microsoft","description":"Bidirectionally transformed strings","archived":false,"fork":false,"pushed_at":"2024-01-11T21:12:10.000Z","size":1001,"stargazers_count":367,"open_issues_count":6,"forks_count":17,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-04T03:07:01.950Z","etag":null,"topics":["sequence-alignment","string"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/microsoft.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-06-07T17:04:27.000Z","updated_at":"2024-12-29T17:41:01.000Z","dependencies_parsed_at":"2023-02-08T12:45:36.128Z","dependency_job_id":"9728668e-016f-4b59-91e7-415ca7f9528b","html_url":"https://github.com/microsoft/bistring","commit_stats":{"total_commits":110,"total_committers":6,"mean_commits":"18.333333333333332","dds":"0.31818181818181823","last_synced_commit":"739b2620d0de1936ab915b5e92c9de141c169d51"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fbistring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fbistring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fbistring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fbistring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/bistring/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647256,"owners_count":21139081,"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":["sequence-alignment","string"],"created_at":"2024-08-02T01:01:32.276Z","updated_at":"2025-04-12T23:41:44.177Z","avatar_url":"https://github.com/microsoft.png","language":"Python","readme":"bistring\n========\n\n|Build status| |Documentation status|\n\nThe bistring library provides non-destructive versions of common string processing operations like normalization, case folding, and find/replace.\nEach bistring remembers the original string, and how its substrings map to substrings of the modified version.\n\nFor example:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from bistring import bistr\n    \u003e\u003e\u003e s = bistr('𝕿𝖍𝖊 𝖖𝖚𝖎𝖈𝖐, 𝖇𝖗𝖔𝖜𝖓 🦊 𝖏𝖚𝖒𝖕𝖘 𝖔𝖛𝖊𝖗 𝖙𝖍𝖊 𝖑𝖆𝖟𝖞 🐶')\n    \u003e\u003e\u003e s = s.normalize('NFKD')     # Unicode normalization\n    \u003e\u003e\u003e s = s.casefold()            # Case-insensitivity\n    \u003e\u003e\u003e s = s.replace('🦊', 'fox')  # Replace emoji with text\n    \u003e\u003e\u003e s = s.replace('🐶', 'dog')\n    \u003e\u003e\u003e s = s.sub(r'[^\\w\\s]+', '')  # Strip everything but letters and spaces\n    \u003e\u003e\u003e s = s[:19]                  # Extract a substring\n    \u003e\u003e\u003e s.modified                  # The modified substring, after changes\n    'the quick brown fox'\n    \u003e\u003e\u003e s.original                  # The original substring, before changes\n    '𝕿𝖍𝖊 𝖖𝖚𝖎𝖈𝖐, 𝖇𝖗𝖔𝖜𝖓 🦊'\n\n\nLanguages\n---------\n\n|PyPI version| |npm version|\n\nbistring is available in multiple languages, currently `Python \u003cpython\u003e`_ and `JavaScript/TypeScript \u003cjs\u003e`_.\nPorts to other languages are planned for the near future.\n\nThe code is structured similarly in each language to make it easy to share algorithms, tests, and fixes between them.\nThe main differences come from trying to mirror the language's built-in string API.\nIf you want to contribute a bug fix or a new feature, feel free to implement it in any one of the supported languages, and we'll try to port it to the rest of them.\n\n\nDemo\n----\n\n`Click here \u003chttps://microsoft.github.io/bistring/demo.html\u003e`_ for a live demo of the bistring library in your browser.\n\n\nContributing\n------------\n\nThis project welcomes contributions and suggestions.\nMost contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution.\nFor details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment).\nSimply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the `Microsoft Open Source Code of Conduct \u003chttps://opensource.microsoft.com/codeofconduct/\u003e`_.\nFor more information see the `Code of Conduct FAQ \u003chttps://opensource.microsoft.com/codeofconduct/faq/\u003e`_ or contact `opencode@microsoft.com \u003cmailto:opencode@microsoft.com\u003e`_ with any additional questions or comments.\n\n\n.. |Build status| image:: https://github.com/microsoft/bistring/actions/workflows/ci.yml/badge.svg\n    :target: https://github.com/microsoft/bistring/actions/workflows/ci.yml\n.. |Documentation status| image:: https://readthedocs.org/projects/bistring/badge/?version=latest\n    :target: https://bistring.readthedocs.io/en/latest/?badge=latest\n.. |PyPI version| image:: https://badge.fury.io/py/bistring.svg\n    :target: https://pypi.org/project/bistring/\n.. |npm version| image:: https://badge.fury.io/js/bistring.svg\n    :target: https://www.npmjs.com/package/bistring\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fbistring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fbistring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fbistring/lists"}