PostgreSQL Source Code git master
stringutils.h
Go to the documentation of this file.
1/*
2 * psql - the PostgreSQL interactive terminal
3 *
4 * Copyright (c) 2000-2025, PostgreSQL Global Development Group
5 *
6 * src/bin/psql/stringutils.h
7 */
8#ifndef STRINGUTILS_H
9#define STRINGUTILS_H
10
11/* The cooler version of strtok() which knows about quotes and doesn't
12 * overwrite your input */
13extern char *strtokx(const char *s,
14 const char *whitespace,
15 const char *delim,
16 const char *quote,
17 char escape,
18 bool e_strings,
19 bool del_quotes,
20 int encoding);
21
22extern void strip_quotes(char *source, char quote, char escape, int encoding);
23
24extern char *quote_if_needed(const char *source, const char *entails_quote,
25 char quote, char escape, bool force_quote,
26 int encoding);
27
28#endif /* STRINGUTILS_H */
int32 encoding
Definition: pg_database.h:41
static rewind_source * source
Definition: pg_rewind.c:89
char * strtokx(const char *s, const char *whitespace, const char *delim, const char *quote, char escape, bool e_strings, bool del_quotes, int encoding)
Definition: stringutils.c:52
char * quote_if_needed(const char *source, const char *entails_quote, char quote, char escape, bool force_quote, int encoding)
Definition: stringutils.c:292
void strip_quotes(char *source, char quote, char escape, int encoding)
Definition: stringutils.c:240