An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

nuget.org : vst.stringparse

Provides a Parse generic extension method for string that converts string to T and no boxing occurs ``` C# // The following code does not occur boxing var a1 = "123".Parse<int>(); // a1 == 123 var a3 = "123".Parse<int?>(); // a3 == 123 ``` # Usage example ``` C# using System; using System.Globalization; using StringParse; void Exmaple1() { _ = "12".Parse<int>(); // 12 // _ = "ss".Parse<int>(); // throw FormatException // with default value, Actually call the TryParse method internally _ = "12".ParseOr(10); // 12 _ = "ss".ParseOr(10); // 10 // with NumberStyles _ = "F".Parse<int>(NumberStyles.HexNumber); // 15 // parse Nullable _ = "12".Parse<int?>(); // 12 // _ = "ss".Parse<int?>(); // throw FormatException // TryParse _ = "12".TryParse(out int _); // true _ = "ss".TryParse(out int _); // false // Parse Enum _ = "Saturday".ParseEnum<DayOfWeek>(); // DayOfWeek.Saturday _ = "Saturday".TryParseEnum(out DayOfWeek _); // true } ```

Registry - Source - JSON - codemeta.json
purl: pkg:nuget/vst.stringparse
Keywords: Generic , String , Extension , Parse , TryParse , extension-method , generic , parse , string
License: MIT
Latest release: about 3 years ago
First release: about 5 years ago
Downloads: 4,345 total
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 17 days ago

2.0.0.2
Published: about 3 years ago
Registry - Download
2.0.0.1
Published: about 3 years ago
Registry - Download
2.0.0
Published: about 3 years ago
Registry - Download
2.0.0-alpha
Published: about 3 years ago
Registry - Download
1.0.0
Published: about 5 years ago
Registry - Download
1.0.0-alpha2
Published: about 5 years ago
Registry - Download
1.0.0-alpha1
Published: about 5 years ago
Registry - Download