Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C cpptrim
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Lartu
  • cpptrim
  • Merge requests
  • !2

Open
Created Mar 17, 2019 by Lartu@lartu🐕Maintainer
  • Report abuse
Report abuse

Updates & Simplifications

  • Overview 0
  • Commits 7
  • Changes 3

Created by: VictorSCushman

Hello Martín.

I was browsing the source of LDPL and noticed that it was using the cpptrim.h file from this repository. I thought that there were some simplifications that could be done to the cpptrim library to make the source code smaller and cleaner.

The changes in this merge request basically completely overhaul the library. Some of the things changed:

  • cpptrim uses the built-in std::string methods instead of manually searching character by character.
  • cpptrim was given its own cpptrim namespace to avoid potential name conflicts in other projects.
  • cpptrim::trim_left and cpptrim::trim_right were added that trim leading and trailing whitespace respectively.
  • More tests/examples were added to example/example.cpp. The example file was tested using clang++ --std=c++11 -Wall -Wextra example/example.cpp

Since this basically changes the entire library I can understand if you'd rather not accept this pull request, but I thought both as a way to give back to the open source community and further the development of LDPL I would submit my changes.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: github/fork/VictorSCushman/master