Header And Logo

PostgreSQL
| The world's most advanced open source database.

stringutils.h

Go to the documentation of this file.
00001 /*
00002  * psql - the PostgreSQL interactive terminal
00003  *
00004  * Copyright (c) 2000-2013, PostgreSQL Global Development Group
00005  *
00006  * src/bin/psql/stringutils.h
00007  */
00008 #ifndef STRINGUTILS_H
00009 #define STRINGUTILS_H
00010 
00011 /* The cooler version of strtok() which knows about quotes and doesn't
00012  * overwrite your input */
00013 extern char *strtokx(const char *s,
00014         const char *whitespace,
00015         const char *delim,
00016         const char *quote,
00017         char escape,
00018         bool e_strings,
00019         bool del_quotes,
00020         int encoding);
00021 
00022 extern void strip_quotes(char *source, char quote, char escape, int encoding);
00023 
00024 extern char *quote_if_needed(const char *source, const char *entails_quote,
00025                 char quote, char escape, int encoding);
00026 
00027 #endif   /* STRINGUTILS_H */