File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ Please check the GitHub repository getting more info.
1414
1515## Release notes
1616
17+ ### [ 2023-07-10] 0.0.5
18+ - Fix crash in case of leading and trailing spaces
19+
1720### [ 2023-07-10] 0.0.4
1821- Added capitalCase on the project name
1922
Original file line number Diff line number Diff line change @@ -7,17 +7,13 @@ public static class StringExtensions
77 public static string ToCapitalCase ( this string str )
88 {
99 // Implement capital case logic here
10- if ( str == null )
11- {
12- throw new ArgumentNullException ( nameof ( str ) ) ;
13- }
14- if ( str . Length == 0 )
10+ if ( string . IsNullOrWhiteSpace ( str ) )
1511 {
1612 return str ;
1713 }
1814
1915 // Split the string into words separated by a space character or period
20- var splitString = str . Split ( ' ' , '.' ) ;
16+ var splitString = str . Trim ( ) . Split ( ' ' , '.' ) ;
2117 var sb = new StringBuilder ( ) ;
2218 foreach ( var word in splitString )
2319 {
Original file line number Diff line number Diff line change 77 <Nullable >enable</Nullable >
88 <PackAsTool >true</PackAsTool >
99 <ToolCommandName >genocs</ToolCommandName >
10- <PackageVersion >0.0.4 </PackageVersion >
10+ <PackageVersion >0.0.5 </PackageVersion >
1111 <PackageOutputPath >./nupkg</PackageOutputPath >
1212 <PackageId >Genocs.CLI</PackageId >
1313 <Title >Genocs CLI Tool</Title >
1919 <PackageReadmeFile >README.md</PackageReadmeFile >
2020 <PackageLicenseFile >LICENSE</PackageLicenseFile >
2121 <PackageIcon >icon.png</PackageIcon >
22- <VersionPrefix >0.0.4 </VersionPrefix >
22+ <VersionPrefix >0.0.5 </VersionPrefix >
2323</PropertyGroup >
2424
2525 <ItemGroup >
You can’t perform that action at this time.
0 commit comments