{"id":29027322,"url":"https://github.com/rameel/ramstack.structures","last_synced_at":"2025-06-26T06:05:25.516Z","repository":{"id":246725262,"uuid":"822153429","full_name":"rameel/ramstack.structures","owner":"rameel","description":"Ramstack.Structures is a .NET library providing various data structures and utilities.","archived":false,"fork":false,"pushed_at":"2025-04-08T03:04:08.000Z","size":155,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T17:09:36.473Z","etag":null,"topics":["arrayview","readonlyarray","stringview"],"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/rameel.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":"2024-06-30T12:29:59.000Z","updated_at":"2025-04-06T15:40:30.000Z","dependencies_parsed_at":"2025-03-18T03:31:16.570Z","dependency_job_id":null,"html_url":"https://github.com/rameel/ramstack.structures","commit_stats":null,"previous_names":["rameel/ramstack.structures"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/rameel/ramstack.structures","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rameel%2Framstack.structures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rameel%2Framstack.structures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rameel%2Framstack.structures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rameel%2Framstack.structures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rameel","download_url":"https://codeload.github.com/rameel/ramstack.structures/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rameel%2Framstack.structures/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262010867,"owners_count":23244414,"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":["arrayview","readonlyarray","stringview"],"created_at":"2025-06-26T06:05:24.856Z","updated_at":"2025-06-26T06:05:25.478Z","avatar_url":"https://github.com/rameel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ramstack.Structures\r\n\r\n[![NuGet](https://img.shields.io/nuget/v/Ramstack.Structures.svg)](https://nuget.org/packages/Ramstack.Structures)\r\n[![MIT](https://img.shields.io/github/license/rameel/ramstack.structures)](https://github.com/rameel/ramstack.structures/blob/main/LICENSE)\r\n\r\nRamstack.Structures is a .NET library providing various data structures and utilities.\r\n\r\n## Installation\r\n\r\nTo install the `Ramstack.Structures` [NuGet package](https://www.nuget.org/packages/Ramstack.Structures) to your project, use the following command:\r\n\r\n```console\r\ndotnet add package Ramstack.Structures\r\n```\r\n\r\n## Features\r\n\r\nThe current release includes primary types:\r\n\r\n* `Ramstack.Text.StringView`:\u003cbr\u003eRepresents a read-only view of a string, providing safe and efficient access to a subset of its characters.\r\n* `Ramstack.Collections.ArrayView\u003cT\u003e`:\u003cbr\u003eA generic read-only view of an array, allowing safe and efficient access to a subset of its elements.\r\n* `Ramstack.Collections.ReadOnlyArray\u003cT\u003e`:\u003cbr\u003eA generic read-only array wrapper, similar to `ImmutableArray\u003cT\u003e`, but with some performance improvements and better code generation in certain cases.\r\n\r\nAdditionally, the library provides the `StringViewComparer` class, which offers various comparators accessible through corresponding properties:\r\n\r\n| Property                       | Description                                                                                                                                       |\r\n|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\r\n| **Ordinal**                    | Gets a **StringViewComparer** object that performs a case-sensitive ordinal string comparison.                                                    |\r\n| **OrdinalIgnoreCase**          | Gets a **StringViewComparer** object that performs a case-insensitive ordinal string comparison.                                                  |\r\n| **CurrentCulture**             | Gets a **StringViewComparer** object that performs case-sensitive string comparisons using the word comparison rules of the current culture.      |\r\n| **CurrentCultureIgnoreCase**   | Gets a **StringViewComparer** object that performs case-insensitive string comparisons using the word comparison rules of the current culture.    |\r\n| **InvariantCulture**           | Gets a **StringViewComparer** object that performs a case-sensitive string comparison using the word comparison rules of the invariant culture.   |\r\n| **InvariantCultureIgnoreCase** | Gets a **StringViewComparer** object that performs a case-insensitive string comparison using the word comparison rules of the invariant culture. |\r\n\r\n## Notes\r\n\r\nThe `ArrayView\u003cT\u003e` and `ReadOnlyArray\u003cT\u003e` types have a `ref readonly` indexer, which provides efficient access to elements of the underlying array,\r\navoiding expensive copying in the case of large structures.\r\n\r\nThis same optimization is also applied to the enumerators of these types. The `Current` property has a `ref readonly` signature,\r\nwhich enables the following pattern when necessary:\r\n\r\n```csharp\r\nforeach (ref readonly HeavyStruct s in view)\r\n{\r\n    ...\r\n}\r\n\r\n```\r\n## Changelog\r\n\r\n### 1.2.2\r\n- Optimize `ArrayView.Create` method for empty collection expression\r\n\r\n### 1.2.1\r\n- Add `List\u003cT\u003e` to `ArrayView\u003cT\u003e` extension for NET9.0+\r\n\r\n### 1.2.0\r\n- Add `Trim` overloads to `StringView` class\r\n\r\n## Supported versions\r\n\r\n|      | Version    |\r\n|------|------------|\r\n| .NET | 6, 7, 8, 9 |\r\n\r\n## Contributions\r\n\r\nBug reports and contributions are welcome.\r\n\r\n## License\r\nThis package is released as open source under the **MIT License**.\r\n\r\nSee the [LICENSE](LICENSE) file for more details.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frameel%2Framstack.structures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frameel%2Framstack.structures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frameel%2Framstack.structures/lists"}