@@ -424,7 +424,7 @@ public byte[] GetBytes()
424424 else
425425 {
426426 var svalue = GetString ( ) ;
427- if ( ( Field . Length % Field . Charset . BytesPerCharacter ) == 0 && svalue . EnumerateRunesToChars ( ) . Count ( ) > Field . CharCount )
427+ if ( ( Field . Length % Field . Charset . BytesPerCharacter ) == 0 && svalue . CountRunes ( ) > Field . CharCount )
428428 {
429429 throw IscException . ForErrorCodes ( new [ ] { IscCodes . isc_arith_except , IscCodes . isc_string_truncation } ) ;
430430 }
@@ -460,7 +460,7 @@ public byte[] GetBytes()
460460 else
461461 {
462462 var svalue = GetString ( ) ;
463- if ( ( Field . Length % Field . Charset . BytesPerCharacter ) == 0 && svalue . EnumerateRunesToChars ( ) . Count ( ) > Field . CharCount )
463+ if ( ( Field . Length % Field . Charset . BytesPerCharacter ) == 0 && svalue . CountRunes ( ) > Field . CharCount )
464464 {
465465 throw IscException . ForErrorCodes ( new [ ] { IscCodes . isc_arith_except , IscCodes . isc_string_truncation } ) ;
466466 }
@@ -639,7 +639,7 @@ public async ValueTask<byte[]> GetBytesAsync(CancellationToken cancellationToken
639639 else
640640 {
641641 var svalue = await GetStringAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
642- if ( ( Field . Length % Field . Charset . BytesPerCharacter ) == 0 && svalue . EnumerateRunesToChars ( ) . Count ( ) > Field . CharCount )
642+ if ( ( Field . Length % Field . Charset . BytesPerCharacter ) == 0 && svalue . CountRunes ( ) > Field . CharCount )
643643 {
644644 throw IscException . ForErrorCodes ( new [ ] { IscCodes . isc_arith_except , IscCodes . isc_string_truncation } ) ;
645645 }
@@ -675,7 +675,7 @@ public async ValueTask<byte[]> GetBytesAsync(CancellationToken cancellationToken
675675 else
676676 {
677677 var svalue = await GetStringAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
678- if ( ( Field . Length % Field . Charset . BytesPerCharacter ) == 0 && svalue . EnumerateRunesToChars ( ) . Count ( ) > Field . CharCount )
678+ if ( ( Field . Length % Field . Charset . BytesPerCharacter ) == 0 && svalue . CountRunes ( ) > Field . CharCount )
679679 {
680680 throw IscException . ForErrorCodes ( new [ ] { IscCodes . isc_arith_except , IscCodes . isc_string_truncation } ) ;
681681 }
0 commit comments