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