{"id":22612232,"url":"https://github.com/ivanbgd/rope-data-structure-c","last_synced_at":"2025-08-14T21:16:01.988Z","repository":{"id":139677036,"uuid":"98011988","full_name":"ivanbgd/Rope-Data-Structure-C","owner":"ivanbgd","description":"A C implementation of a data structure that can store a string and efficiently cut a part (a substring) of this string and insert it in a different position","archived":false,"fork":false,"pushed_at":"2024-09-20T23:41:55.000Z","size":13,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T06:23:59.591Z","etag":null,"topics":["c","rope","rope-string","string-manipulation","text-processing"],"latest_commit_sha":null,"homepage":"","language":"C","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/ivanbgd.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":"2017-07-22T06:30:57.000Z","updated_at":"2025-01-09T19:38:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"41734269-b19d-4b66-8d8f-a1ce052d70c9","html_url":"https://github.com/ivanbgd/Rope-Data-Structure-C","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/ivanbgd%2FRope-Data-Structure-C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanbgd%2FRope-Data-Structure-C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanbgd%2FRope-Data-Structure-C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanbgd%2FRope-Data-Structure-C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanbgd","download_url":"https://codeload.github.com/ivanbgd/Rope-Data-Structure-C/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248363553,"owners_count":21091379,"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":["c","rope","rope-string","string-manipulation","text-processing"],"created_at":"2024-12-08T17:11:30.419Z","updated_at":"2025-04-11T08:57:42.678Z","avatar_url":"https://github.com/ivanbgd.png","language":"C","readme":"# Rope Data Structure in C\n\n## Description\n\nA *C* implementation of a data structure that can store a string and efficiently cut a part\n(a substring) of this string and insert it in a different position.\n\nThe current implementation only processes a given string.\nIt doesn't support insertion of new characters in the string. \n\n[Wikipedia page on Rope](https://en.wikipedia.org/wiki/Rope_(data_structure))\n\nUses [Splay tree](https://en.wikipedia.org/wiki/Splay_tree) to implement the Rope data structure.\n\n## Implementation\n\nNodes don't have keys. They only have values. And the value is a character.  \nThat means that one node contains and represents a single character.\n\nThis data structure is about strings. The string represents (is) contents of a text document.  \nIn a string, characters are in order, naturally. The order is represented by their rank. That's why we use\norder statistics to locate a node when searching for it (when performing a \"find\" operation).\n\nThe rank can be seen as their index, and we'll use 0-based indexing.\n\nThe size of a node doesn't have anything to do with its rank. Also, when a node is splayed, its rank doesn't\nchange; only its size changes.\n\nOne has to think in terms of node rank, and not in terms of node key, as is usual!\n\nWe could also add the field \"rank\" to Node objects.  \nBut, that's not needed. In-order traversal yields all characters in order.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanbgd%2Frope-data-structure-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanbgd%2Frope-data-structure-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanbgd%2Frope-data-structure-c/lists"}