File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ _ReSharper.Caches/**
55* .user
66UnicodeHelper /Resources /UCD /**
77** /* .snk
8+ .idea /.idea.UnicodeHelper /**
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
1+ using System . Collections . Generic ;
32using System . Runtime . CompilerServices ;
43
54namespace UnicodeHelper . Internal
@@ -8,9 +7,6 @@ internal static class HelperUtils
87 {
98 public static TextDirection DetermineDirection ( IEnumerable < UCodepoint > codepoints )
109 {
11- if ( codepoints == null )
12- throw new ArgumentNullException ( nameof ( codepoints ) ) ;
13-
1410 bool inIsolate = false ;
1511 foreach ( UCodepoint uc in codepoints )
1612 {
Original file line number Diff line number Diff line change @@ -723,6 +723,16 @@ public UString Normalize(NormalizationForm form)
723723 return NormalizationEngine . Normalize ( this , form ) ;
724724 }
725725
726+ /// <summary>
727+ /// Converts this Unicode string into a standard .Net string from a substring of
728+ /// this Unicode string.
729+ /// The portion starts at a specified character and continues to the end of the string.
730+ /// </summary>
731+ public string ToString ( int start )
732+ {
733+ return ToString ( start , Length - start ) ;
734+ }
735+
726736 /// <summary>
727737 /// Converts this Unicode string into a standard .Net string from a substring of
728738 /// this Unicode string.
Original file line number Diff line number Diff line change @@ -105,9 +105,13 @@ public void Dispose()
105105 {
106106 codepointArrayPool . Return ( _codepoints ) ;
107107 _codepoints = null ;
108+ _length = 0 ;
108109 GC . SuppressFinalize ( this ) ;
109110 }
110111
112+ /// <summary>
113+ /// Finalizes an instance of the <see cref="UStringBuilder"/> class.
114+ /// </summary>
111115 ~ UStringBuilder ( )
112116 {
113117 codepointArrayPool . Return ( _codepoints ) ;
Original file line number Diff line number Diff line change 77 <RunAnalyzersDuringLiveAnalysis >False</RunAnalyzersDuringLiveAnalysis >
88 <GeneratePackageOnBuild >True</GeneratePackageOnBuild >
99 <Title >Unicode Helper</Title >
10- <Version >0.9.1 </Version >
10+ <Version >0.9.2 </Version >
1111 <Authors >FoolRunning</Authors >
1212 <Description >.Net library to get information about Unicode codepoints and to better handle the upper planes (1-16) of Unicode.</Description >
1313 <Copyright >© 2025 Tim Steenwyk</Copyright >
2121 <DelaySign >False</DelaySign >
2222 <GenerateDocumentationFile >True</GenerateDocumentationFile >
2323 <AllowUnsafeBlocks >True</AllowUnsafeBlocks >
24- <PackageReleaseNotes >Added compatibility normalization to UString.</PackageReleaseNotes >
24+ <PackageReleaseNotes >Added UString.ToString overload .</PackageReleaseNotes >
2525 </PropertyGroup >
2626
2727 <ItemGroup >
You can’t perform that action at this time.
0 commit comments