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

Function count_comma_separated_elems

src/interfaces/libpq/fe-connect.c:1034–1047  ·  view source on GitHub ↗

* Count the number of elements in a simple comma-separated list. */

Source from the content-addressed store, hash-verified

1032 * Count the number of elements in a simple comma-separated list.
1033 */
1034static int
1035count_comma_separated_elems(const char *input)
1036{
1037 int n;
1038
1039 n = 1;
1040 for (; *input != '\0'; input++)
1041 {
1042 if (*input == ',')
1043 n++;
1044 }
1045
1046 return n;
1047}
1048
1049/*
1050 * Parse a simple comma-separated list.

Callers 1

connectOptions2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected