Skip to content

Add string extension methods#10

Merged
drebrez merged 5 commits intomainfrom
feature/string-extensions
Oct 8, 2025
Merged

Add string extension methods#10
drebrez merged 5 commits intomainfrom
feature/string-extensions

Conversation

@drebrez
Copy link
Copy Markdown
Collaborator

@drebrez drebrez commented Jul 18, 2025

No description provided.

@drebrez drebrez requested a review from neoscie July 18, 2025 10:13
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 18, 2025

/_8c779

File Coverage
All files 97%

/f8d494

File Coverage
All files 100%

/fcc13d

File Coverage
All files 100%

/ff5d4f

File Coverage
All files 97%

Minimum allowed coverage is 100%

Generated by 🐒 cobertura-action against 8c476d9

Comment thread Neolution.Utilities/StringExtensions.cs Outdated
@neoscie neoscie self-assigned this Jul 18, 2025
@neoscie neoscie requested a review from Copilot July 18, 2025 10:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds string extension methods to the Neolution.Utilities library, specifically implementing Truncate methods for string manipulation. The implementation provides two overloads: one with a simple maximum length parameter and another that accepts a suffix to append when truncation occurs.

  • Implements Truncate extension methods for strings with optional suffix support
  • Adds comprehensive unit tests covering various scenarios including null/empty strings and edge cases
  • Updates the changelog to document the new string extension methods

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
Neolution.Utilities/StringExtensions.cs Implements the Truncate extension methods with proper null handling and range slicing
Neolution.Utilities.UnitTests/StringExtensionsTests.cs Comprehensive unit tests covering edge cases and various input scenarios
CHANGELOG.md Documents the addition of string extension methods
Comments suppressed due to low confidence (1)

Neolution.Utilities.UnitTests/StringExtensionsTests.cs:45

  • This test case exposes a potential issue where maxLength is 0 but the result exceeds that length due to the suffix. Consider adding test cases for negative maxLength values and null suffix to ensure proper error handling.
    [InlineData("abcdef", 0, "!", "!")]

Comment thread Neolution.Utilities/StringExtensions.cs Outdated
Comment thread Neolution.Utilities/StringExtensions.cs Outdated
Comment thread Neolution.Utilities/StringExtensions.cs Outdated
neoscie
neoscie previously approved these changes Jul 29, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread Neolution.Utilities/Extensions/StringExtensions.cs
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 7, 2025

Package Line Rate Branch Rate Complexity Health
Neolution.Utilities.AspNetCore 100% 100% 2
Neolution.Utilities.EntityFrameworkCore 100% 100% 5
Neolution.Utilities 100% 100% 17
Summary 100% (51 / 51) 100% (20 / 20) 24

@drebrez drebrez enabled auto-merge (squash) October 8, 2025 09:55
@drebrez drebrez merged commit ea73b6b into main Oct 8, 2025
4 checks passed
@drebrez drebrez deleted the feature/string-extensions branch October 8, 2025 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants