-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add newline character strip flag to flux_buffer_read_line() #1624
Comments
Not that this isn't a good idea, but since e7fd48c Just my opinion, but I'm not a fan of the extra argument to |
Ohh, I wasn't even aware
which I guess is unnecessary. Not sure a But for the mean time, this isn't important since |
Oh yeah, sorry I wasn't thinking when I typed that. I was forgetting how the In the future we could add a flag to the buffer as a whole maybe, or a separate function
Yeah, that predates the changes to |
For convenience, support flux_buffer_peek_trimmed_line() and flux_buffer_read_trimmed_line() variants, which will read lines but strip off any trailing newline characters. Fixes flux-framework#1624
For convenience, support flux_buffer_peek_trimmed_line() and flux_buffer_read_trimmed_line() variants, which will read lines but strip off any trailing newline characters. Fixes flux-framework#1624
For convenience, support flux_buffer_peek_trimmed_line() and flux_buffer_read_trimmed_line() variants, which will read lines but strip off any trailing newline characters. Fixes flux-framework#1624
For convenience, support flux_buffer_peek_trimmed_line() and flux_buffer_read_trimmed_line() variants, which will read lines but strip off any trailing newline characters. Fixes flux-framework#1624
For convenience, support flux_buffer_peek_trimmed_line() and flux_buffer_read_trimmed_line() variants, which will read lines but strip off any trailing newline characters. Fixes flux-framework#1624
For convenience, support flux_buffer_peek_trimmed_line() and flux_buffer_read_trimmed_line() variants, which will read lines but strip off any trailing newline characters. Fixes flux-framework#1624
While working on #1331, it occurred to me that dumping data from a buffer to a log was common. By default,
flux_buffer_read_line()
returns a buffer with the newline character at the end, which should be stripped before dumping into a log.It would be convenient if the library had an option to automatically strip it for you. I'm imagining just a boolean flag, so a
flux_buffer_read_line (flux_buffer_t *b, int *len, bool newline)
prototype.The flag would have to be propogated into APIs that call this too of course.
The text was updated successfully, but these errors were encountered: