Refactor logic to remove trailing CR/LF characters from strings

Michael Paquier <michael@paquier.xyz>

Commit: b8f2da0ac5a24f669c8d320c58646759b8fc69a5
Author: Michael Paquier <michael@paquier.xyz>
Date: 2019-08-09T02:05:14Z
Releases: 13.0
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

Files

Discussion