Skip to content

Conversation

@dom-baur
Copy link
Contributor

@dom-baur dom-baur commented Aug 26, 2025

Add features ltrim, rtrim and trim for issue #29

@dom-baur dom-baur requested a review from a team as a code owner August 26, 2025 08:38
@drebrez drebrez requested a review from Copilot August 26, 2025 10:58
Copy link
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 three new string utility functions for trimming specific substrings from strings: ltrim (left trim), rtrim (right trim), and trim (both sides). These functions extend the existing string utilities by allowing removal of custom needle strings rather than just whitespace.

  • Added ltrim, rtrim, and trim functions to handle custom substring trimming
  • Comprehensive test coverage for all three functions including edge cases
  • Updated CHANGELOG.md to document the new functionality

Reviewed Changes

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

File Description
src/lib/string.ts Implements the three new trim functions with proper null/undefined handling
src/lib/string.spec.ts Adds comprehensive test cases covering normal usage and edge cases
CHANGELOG.md Documents the addition of the new string utility functions

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

@dom-baur dom-baur changed the title Add string utility functions: ltrim, rtrim, trim (#29) Add string utility functions: ltrim, rtrim, trim issue 29 Aug 26, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 26, 2025

Open in StackBlitz

npm i https://pkg.pr.new/neolution-ch/javascript-utils/@neolution-ch/javascript-utils@74

commit: 6ae4533

@dom-baur dom-baur changed the title Add string utility functions: ltrim, rtrim, trim issue 29 Add string utility functions: ltrim, rtrim, trim Aug 26, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@drebrez drebrez requested a review from manni497 September 8, 2025 12:21
@manni497 manni497 changed the title Add string utility functions: ltrim, rtrim, trim Add string utility functions: trimStart, trimEnd, trim Sep 9, 2025
@dom-baur dom-baur requested a review from manni497 September 9, 2025 08:10
manni497
manni497 previously approved these changes Sep 9, 2025
@manni497
Copy link
Collaborator

manni497 commented Sep 9, 2025

@drebrez THe PR is fine for me, I will let you double check and merge it if it's fine :)

@github-actions
Copy link

github-actions bot commented Sep 9, 2025

Package Line Rate Branch Rate Complexity Health
main 100% 100% 0
Summary 100% (221 / 221) 100% (110 / 110) 0

@dom-baur dom-baur requested a review from manni497 September 9, 2025 11:07
@dom-baur dom-baur requested a review from drebrez September 9, 2025 11:07
@drebrez drebrez merged commit 256fda4 into neolution-ch:main Sep 9, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants