PostgreSQL Source Code  git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
stringutils.h
Go to the documentation of this file.
1 /*
2  * psql - the PostgreSQL interactive terminal
3  *
4  * Copyright (c) 2000-2024, 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 */
13 extern 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 
22 extern void strip_quotes(char *source, char quote, char escape, int encoding);
23 
24 extern 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 * quote_if_needed(const char *source, const char *entails_quote, char quote, char escape, bool force_quote, int encoding)
Definition: stringutils.c:292
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
void strip_quotes(char *source, char quote, char escape, int encoding)
Definition: stringutils.c:240