File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -295,9 +295,6 @@ public StringView TrimStart(params char[]? trimChars) =>
295295 /// </returns>
296296 public StringView TrimStart ( ReadOnlySpan < char > trimChars )
297297 {
298- if ( trimChars . Length == 0 )
299- return TrimStart ( ) ;
300-
301298 var start = _index ;
302299 var final = _index + _length ;
303300 var value = _value ;
@@ -384,9 +381,6 @@ public StringView TrimEnd(params char[]? trimChars) =>
384381 /// </returns>
385382 public StringView TrimEnd ( ReadOnlySpan < char > trimChars )
386383 {
387- if ( trimChars . Length == 0 )
388- return TrimEnd ( ) ;
389-
390384 var start = _index ;
391385 var final = _index + _length - 1 ;
392386 var value = _value ;
@@ -485,9 +479,6 @@ public StringView Trim(params char[]? trimChars) =>
485479 /// </returns>
486480 public StringView Trim ( ReadOnlySpan < char > trimChars )
487481 {
488- if ( trimChars . Length == 0 )
489- return Trim ( ) ;
490-
491482 var start = _index ;
492483 var final = _index + _length - 1 ;
493484 var value = _value ;
@@ -496,7 +487,6 @@ public StringView Trim(ReadOnlySpan<char> trimChars)
496487 {
497488 for ( ; start <= final ; start ++ )
498489 {
499-
500490 for ( var i = 0 ; i < trimChars . Length ; i ++ )
501491 if ( value . GetRawStringData ( start ) == trimChars [ i ] )
502492 goto MATCHED ;
You can’t perform that action at this time.
0 commit comments