MCPcopy Create free account
hub / github.com/apache/cloudberry / pg_strip_crlf

Function pg_strip_crlf

src/common/string.c:120–130  ·  view source on GitHub ↗

* pg_strip_crlf -- Remove any trailing newline and carriage return * * Removes any trailing newline and carriage return characters (\r on * Windows) in the input string, zero-terminating it. * * The passed in string must be zero-terminated. This function returns * the new length of the string. */

Source from the content-addressed store, hash-verified

118 * the new length of the string.
119 */
120int
121pg_strip_crlf(char *str)
122{
123 int len = strlen(str);
124
125 while (len > 0 && (str[len - 1] == '\n' ||
126 str[len - 1] == '\r'))
127 str[--len] = '\0';
128
129 return len;
130}

Callers 13

tokenize_fileFunction · 0.85
simple_promptFunction · 0.85
passwordFromFileFunction · 0.85
getRestoreCommandFunction · 0.85
get_promptFunction · 0.85
CheckDataVersionFunction · 0.85
check_execFunction · 0.85
adjust_data_dirFunction · 0.85
get_sock_dirFunction · 0.85
get_su_pwdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected