{"id":15354857,"url":"https://github.com/bokuweb/lcs-diff-rs","last_synced_at":"2025-04-15T06:16:54.465Z","repository":{"id":62441909,"uuid":"121015834","full_name":"bokuweb/lcs-diff-rs","owner":"bokuweb","description":"📃 Compute differences between two slices using LCS algorithm.","archived":false,"fork":false,"pushed_at":"2023-12-15T05:23:26.000Z","size":15,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T06:16:48.011Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/bokuweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2018-02-10T13:02:09.000Z","updated_at":"2021-12-13T04:07:55.000Z","dependencies_parsed_at":"2024-10-01T12:21:25.043Z","dependency_job_id":"43343b8d-0218-4b20-970a-29df9645e975","html_url":"https://github.com/bokuweb/lcs-diff-rs","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/bokuweb%2Flcs-diff-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Flcs-diff-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Flcs-diff-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokuweb%2Flcs-diff-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bokuweb","download_url":"https://codeload.github.com/bokuweb/lcs-diff-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016643,"owners_count":21198833,"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-01T12:21:20.967Z","updated_at":"2025-04-15T06:16:54.448Z","avatar_url":"https://github.com/bokuweb.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lcs-diff-rs\nCompute differences between two slices using LCS algorithm.\n\n[![](http://meritbadge.herokuapp.com/lcs-diff)](https://crates.io/crates/lcs-diff)\n[![CircleCI](https://circleci.com/gh/bokuweb/lcs-diff-rs.svg?style=svg)](https://circleci.com/gh/bokuweb/lcs-diff-rs)\n[![Build status](https://ci.appveyor.com/api/projects/status/1t0imuj9ie52i2q8/branch/master?svg=true)](https://ci.appveyor.com/project/bokuweb/lcs-diff-rs/branch/master)\n## Example\n\n``` rust\nextern crate lcs_diff;\n\nuse self::lcs_diff::*;\n\nfn main() {\n    let old = vec![\"foo\", \"bar\", \"baz\"];\n    let new = vec![\"foo\", \"baz\", \"hoge\"];\n\n    for diff in lcs_diff::diff(\u0026old, \u0026new) {\n        match diff {\n            DiffResult::Added(a) =\u003e println!(\"+{} new index = {}\", a.data, a.new_index.unwrap()),\n            DiffResult::Common(c) =\u003e {\n                println!(\" {} old index = {}, new index = {}\",\n                         c.data,\n                         c.old_index.unwrap(),\n                         c.new_index.unwrap())\n            }\n            DiffResult::Removed(r) =\u003e println!(\"-{} old index = {}\", r.data, r.old_index.unwrap()),\n        }\n    }\n}\n```\n\nYou can also run example as shown below.\n\n``` bash\nrustup run nightly cargo run --example example\n```\n\n\n## LICENSE\n\nThe MIT License (MIT)\n\nCopyright (c) 2018 @bokuweb\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokuweb%2Flcs-diff-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbokuweb%2Flcs-diff-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokuweb%2Flcs-diff-rs/lists"}