Skip to content

Trim newlines utility function#7718

Merged
maloel merged 3 commits into
realsenseai:developmentfrom
maloel:trim-nls
Nov 5, 2020
Merged

Trim newlines utility function#7718
maloel merged 3 commits into
realsenseai:developmentfrom
maloel:trim-nls

Conversation

@maloel

@maloel maloel commented Nov 4, 2020

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread common/utilities/string/trim-newlines.h Outdated
// fourth\n
inline std::string trim_newlines( std::string s )
{
char const * const base = s.c_str();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you add some comments to the code? What each section does?
maybe about the variables? you got s, base, src and dest , hard to understand what are their roles.

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would consider moving the file to the common folder instead of the utility one. it is more tailored function then a generic one.

@maloel maloel merged commit b50cccf into realsenseai:development Nov 5, 2020
@maloel maloel deleted the trim-nls branch March 25, 2021 14:26
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.

2 participants