Fasteroid.StrinQ 1.0.2

dotnet add package Fasteroid.StrinQ --version 1.0.2                
NuGet\Install-Package Fasteroid.StrinQ -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fasteroid.StrinQ" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Fasteroid.StrinQ --version 1.0.2                
#r "nuget: Fasteroid.StrinQ, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Fasteroid.StrinQ as a Cake Addin
#addin nuget:?package=Fasteroid.StrinQ&version=1.0.2

// Install Fasteroid.StrinQ as a Cake Tool
#tool nuget:?package=Fasteroid.StrinQ&version=1.0.2                

StrinQ

StrinQ is an open-source collection of extension methods similar to those from LINQ, but designed specifically for common string querying tasks. I somehow have severe doubts this will be useful anywhere aside from my one project where I need it, but I'm in too deep to not finish this package now.

If you have an idea for something useful to add, please open a PR! The repository is available here.

Methods

FirstLineEnding

Finds the first line ending from left to right, which could be the end of the string.

public static (int, int) FirstLineEnding(this ReadOnlySpan<char> self)
public static (int, int) FirstLineEnding(this string self)

LastLineBeginning

Finds the first line "beginning" from right to left, which could be the beginning of the string.

public static (int, int) LastLineBeginning(this ReadOnlySpan<char> self)
public static (int, int) LastLineBeginning(this string self)

TakeLines

Reads count lines into the output parameter taken and returns the rest.

public static ReadOnlySpan<char> TakeLines(this ReadOnlySpan<char> self, int count, out string taken)
public static ReadOnlySpan<char> TakeLines(this string self, int count, out string taken)

Parameters:

  • count: How many lines to take
  • taken: Output parameter for taken lines

Throws: ArgumentOutOfRangeException if there aren't enough lines to take.

TakeLinesFromEnd

Reads count lines from the end of the string into the output parameter taken and returns the rest.

public static ReadOnlySpan<char> TakeLinesFromEnd(this ReadOnlySpan<char> self, int count, out string taken)
public static ReadOnlySpan<char> TakeLinesFromEnd(this string self, int count, out string taken)

Parameters:

  • count: How many lines to take
  • taken: Output parameter for taken lines

Throws: ArgumentOutOfRangeException if there aren't enough lines to skip.

SkipLines

Skips count lines and returns the rest.

public static ReadOnlySpan<char> SkipLines(this ReadOnlySpan<char> self, int count)
public static ReadOnlySpan<char> SkipLines(this string self, int count)

Parameters:

  • count: How many lines to skip

Throws: ArgumentOutOfRangeException if there aren't enough lines to take.

SkipLinesFromEnd

Skips count lines from the end of the string and returns the rest.

public static ReadOnlySpan<char> SkipLinesFromEnd(this ReadOnlySpan<char> self, int count)
public static ReadOnlySpan<char> SkipLinesFromEnd(this string self, int count)

Parameters:

  • count: How many lines to skip

Throws: ArgumentOutOfRangeException if there aren't enough lines to skip.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Fasteroid.StrinQ:

Package Downloads
SharpTech.GEOLib

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 154 8/2/2024
1.0.1 86 8/2/2024
1.0.0 93 8/2/2024