aboutsummaryrefslogtreecommitdiff
path: root/src/include/common/string.h
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-08-09 11:05:14 +0900
committerMichael Paquier <michael@paquier.xyz>2019-08-09 11:05:14 +0900
commitb8f2da0ac5a24f669c8d320c58646759b8fc69a5 (patch)
treedc68a064354682b5916a87224ef325f1e83c1bbf /src/include/common/string.h
parent28b901f73a3924187988bfaac57d20e422a432c3 (diff)
downloadpostgresql-b8f2da0ac5a24f669c8d320c58646759b8fc69a5.tar.gz
postgresql-b8f2da0ac5a24f669c8d320c58646759b8fc69a5.zip
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
Diffstat (limited to 'src/include/common/string.h')
-rw-r--r--src/include/common/string.h1
1 files changed, 1 insertions, 0 deletions
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 */