Skip to content

Commit

Permalink
String: Remove modifying ProcessLineByLine implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
JGRennison committed Sep 29, 2024
1 parent b727779 commit bcf1591
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/string_func_extra.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,6 @@
#include <string>
#include <limits>

template <typename F>
inline void ProcessLineByLine(char *buf, F line_functor)
{
char *p = buf;
char *p2 = buf;
/* Print output line by line */
for (; *p2 != '\0'; p2++) {
if (*p2 == '\n') {
*p2 = '\0';
line_functor(p);
p = p2 + 1;
}
}
if (p < p2) line_functor(p);
}

template <typename F>
inline void ProcessLineByLine(std::string_view str, F line_functor)
{
Expand Down

0 comments on commit bcf1591

Please sign in to comment.