You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

Epeshk.Text

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Epeshk.Text

The library for working with text data streams, console input parsing. Inspired by Java Scanner, but optimized for high performance. The library contain types: AsciiScanner, TextScanner

0.0.2
Source
nugetNuGet
Version published
Maintainers
1
Created
Source

Epeshk.Text

Tired of writing something like this:

var n = int.Parse(Console.ReadLine());
var input = Console.ReadLine().Split(' ', StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();

Just replace it with:

var sc = new AsciiScanner();
var input = new int[sc.ReadInt32()];
for (int i = 0; i < input.Length; ++i)
  input[i] = sc.ReadInt32();

And not forget to use StreamWriter.Write instead of Console.Write to avoid excessive flushing!

using var output = new StreamWriter(Console.OpenStandardOutput());

output.WriteLine(Process(line));

Embeddable version

Embeddable version for programming contests available in the project repository!

And not forget to visit my blog

Keywords

scanner

FAQs

Package last updated on 15 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.