PurpleGuy.Utilities.Scanner 0.0.1-alpha

This is a prerelease version of PurpleGuy.Utilities.Scanner.
dotnet add package PurpleGuy.Utilities.Scanner --version 0.0.1-alpha
NuGet\Install-Package PurpleGuy.Utilities.Scanner -Version 0.0.1-alpha
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="PurpleGuy.Utilities.Scanner" Version="0.0.1-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PurpleGuy.Utilities.Scanner --version 0.0.1-alpha
#r "nuget: PurpleGuy.Utilities.Scanner, 0.0.1-alpha"
#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 PurpleGuy.Utilities.Scanner as a Cake Addin
#addin nuget:?package=PurpleGuy.Utilities.Scanner&version=0.0.1-alpha&prerelease

// Install PurpleGuy.Utilities.Scanner as a Cake Tool
#tool nuget:?package=PurpleGuy.Utilities.Scanner&version=0.0.1-alpha&prerelease

C Sharp Scanner Class

What is it?

This class library contains some basic Scanner utilities that can be used as a quick solution to needing to process text information. This can be extremely useful in trying out or modelling a new project and you do not want to mess around with the inbuilt regex class. The main advantage on this is you can "hot swap" what you want returned (More detail given in the Alternating Different Next Calls section).

Currently there is only a StringScanner class which requires you to pass it a string in the constructor stage. This class can only return the next line, double or integer (32-bit).

Why build this?

The project was originally inspired by the Java Scanner class.

I was learning C# by re-implementing some code I had in Java and I was frustrated by the lack of a general purpose Scanner class, so I decided to create my own.

The original code I was working from can be found here

Unfortunately, I can see a way to truly recreate a single multi use scanner class so I have separated the monolithic Scanner class into smaller Single use classes e.g. the StringScanner class. However, I have kept to the general principles used in the original that is to use regex to scan the text.

Unique Features

Alternating Different Next Calls (StringScanner)

Once initialized the StringScanner you can alternate the different Next* calls. For example if we gave it the string

"this is a test \n 94 rest of the line\n

the following line" these calls would return the following.

NextLine() => "this is a test "
NextInt() => 94
NextLine() => " rest of the line"
NextLine() =>the following line"

Future work

Currently there is only one scanner. However, I intend to add some more basic ones such as a ConsoleScanner and a FileScanner. I also intend to add more robust regexes and next calls to each Scanner to allow for wider use e.g. NextDate, NextTime e.c.t. This should make them much more general purpose.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.1-alpha 251 5/13/2020