Skip to content

Add string utility functions: trimStart, trimEnd, trim - #74

Merged
drebrez merged 13 commits into
neolution-ch:mainfrom
dom-baur:feature/trim(29)
Sep 9, 2025
Merged

Add string utility functions: trimStart, trimEnd, trim#74
drebrez merged 13 commits into
neolution-ch:mainfrom
dom-baur:feature/trim(29)

Conversation

@dom-baur

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

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread CHANGELOG.md Outdated
@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

pkg-pr-new Bot commented Aug 26, 2025

Copy link
Copy Markdown

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>
Comment thread src/lib/string.spec.ts Outdated
@drebrez
drebrez requested a review from manni497 September 8, 2025 12:21
Comment thread src/lib/string.ts Outdated
Comment thread src/lib/string.ts Outdated
Comment thread src/lib/string.spec.ts
Comment thread src/lib/string.ts Outdated
Comment thread src/lib/string.ts Outdated
@manni497 manni497 changed the title Add string utility functions: ltrim, rtrim, trim Add string utility functions: trimStart, trimEnd, trim Sep 9, 2025
Comment thread src/lib/string.spec.ts
@dom-baur
dom-baur requested a review from manni497 September 9, 2025 08:10
manni497
manni497 previously approved these changes Sep 9, 2025
@manni497

manni497 commented Sep 9, 2025

Copy link
Copy Markdown
Collaborator

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

@github-actions

github-actions Bot commented Sep 9, 2025

Copy link
Copy Markdown
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.

5 participants