GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rameel/ramstack.structures: Ramstack.Structures is a .NET library providing various data structures and utilities.

BranchesTags
Open more actions menu

Latest commit

 

History

86 Commits
86 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
Ramstack.Structures.Tests
Ramstack.Structures.Tests
 
 
Ramstack.Structures
Ramstack.Structures
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
Directory.Build.props
Directory.Build.props
 
 
Directory.Packages.props
Directory.Packages.props
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Ramstack.Structures.slnx
Ramstack.Structures.slnx
 
 

Repository files navigation

Ramstack.Structures

NuGet MIT

Ramstack.Structures is a .NET library providing various data structures and utilities.

Installation

To install the Ramstack.Structures NuGet package to your project, use the following command:

dotnet add package Ramstack.Structures

Features

The current release includes primary types:

  • Ramstack.Text.StringView:
    Represents a read-only view of a string, providing safe and efficient access to a subset of its characters.
  • Ramstack.Collections.ArrayView<T>:
    A generic read-only view of an array, allowing safe and efficient access to a subset of its elements.
  • Ramstack.Collections.ReadOnlyArray<T>:
    A generic read-only array wrapper, similar to ImmutableArray<T>, but with some performance improvements and better code generation in certain cases.

Additionally, the library provides the StringViewComparer class, which offers various comparators accessible through corresponding properties:

Property Description
Ordinal Gets a StringViewComparer object that performs a case-sensitive ordinal string comparison.
OrdinalIgnoreCase Gets a StringViewComparer object that performs a case-insensitive ordinal string comparison.
CurrentCulture Gets a StringViewComparer object that performs case-sensitive string comparisons using the word comparison rules of the current culture.
CurrentCultureIgnoreCase Gets a StringViewComparer object that performs case-insensitive string comparisons using the word comparison rules of the current culture.
InvariantCulture Gets a StringViewComparer object that performs a case-sensitive string comparison using the word comparison rules of the invariant culture.
InvariantCultureIgnoreCase Gets a StringViewComparer object that performs a case-insensitive string comparison using the word comparison rules of the invariant culture.

Notes

The ArrayView<T> and ReadOnlyArray<T> types have a ref readonly indexer, which provides efficient access to elements of the underlying array, avoiding expensive copying in the case of large structures.

This same optimization is also applied to the enumerators of these types. The Current property has a ref readonly signature, which enables the following pattern when necessary:

foreach (ref readonly HeavyStruct s in view)
{
    ...
}

Supported versions

Version
.NET 6, 7, 8, 9

Contributions

Bug reports and contributions are welcome.

License

This package is released as open source under the MIT License.

See the LICENSE file for more details.

About

Ramstack.Structures is a .NET library providing various data structures and utilities.

Topics

arrayviewreadonlyarraystringview

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.