From b8f2da0ac5a24f669c8d320c58646759b8fc69a5 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Fri, 9 Aug 2019 11:05:14 +0900 Subject: Refactor logic to remove trailing CR/LF characters from strings b654714 has reworked the way trailing CR/LF characters are removed from strings. This commit introduces a new routine in common/string.c and refactors the code so as the logic is in a single place, mostly. Author: Michael Paquier Reviewed-by: Bruce Momjian Discussion: https://postgr.es/m/20190801031820.GF29334@paquier.xyz --- src/include/common/string.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/common/string.h') diff --git a/src/include/common/string.h b/src/include/common/string.h index 77f31337ca4..94f653fdd75 100644 --- a/src/include/common/string.h +++ b/src/include/common/string.h @@ -14,5 +14,6 @@ extern bool pg_str_endswith(const char *str, const char *end); extern int strtoint(const char *pg_restrict str, char **pg_restrict endptr, int base); extern void pg_clean_ascii(char *str); +extern int pg_strip_crlf(char *str); #endif /* COMMON_STRING_H */ -- cgit v1.2.3