postgresql/src/bin/psql/stringutils.h

28 lines
700 B
C
Raw Normal View History

2000-01-19 00:30:24 +01:00
/*
* psql - the PostgreSQL interactive terminal
*
2017-01-03 19:48:53 +01:00
* Copyright (c) 2000-2017, PostgreSQL Global Development Group
2000-01-19 00:30:24 +01:00
*
2010-09-20 22:08:53 +02:00
* src/bin/psql/stringutils.h
2000-01-19 00:30:24 +01:00
*/
#ifndef STRINGUTILS_H
#define STRINGUTILS_H
/* The cooler version of strtok() which knows about quotes and doesn't
* overwrite your input */
1999-11-05 00:14:30 +01:00
extern char *strtokx(const char *s,
const char *whitespace,
1999-11-05 00:14:30 +01:00
const char *delim,
const char *quote,
char escape,
bool e_strings,
bool del_quotes,
int encoding);
extern void strip_quotes(char *source, char quote, char escape, int encoding);
extern char *quote_if_needed(const char *source, const char *entails_quote,
char quote, char escape, int encoding);
#endif /* STRINGUTILS_H */