mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
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
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user