/ gwstring.h / Content
/* GWhere
* Copyright (C) 2000 Sébastien LECACHEUR
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef GW_TOOLS_GWSTRING_H
#define GW_TOOLS_GWSTRING_H
#include
#include "data/gwdata.h"
#ifndef strsep
char * strsep ( char **stringp, const char *delim);
#endif /* strsep */
#if defined ( OS_WIN32)
#include
#else
#ifndef ntohl
#define ntohl gw_ntohl
#endif /* ntohl */
#endif
unsigned long int gw_ntohl ( unsigned long int in);
gchar * gw_l_byte_to_str_format ( long size );
gchar * gw_ul_byte_to_str_format ( unsigned long size );
gchar * gw_ui64_byte_to_str_format ( guint64 size );
gchar * gw_d_byte_to_str_format ( gdouble size );
gchar * gw_ld_byte_to_str_format ( long double size );
long double gw_str_format_to_ld ( gchar * nb);
gchar * gw_tm_to_str_format ( struct tm* p);
gchar * gw_file_to_str ( gchar *str);
gchar * gw_str_to_file ( gchar *str);
gchar * gw_str_to_file_strb ( const gchar *str, GWStringBuffer *buf);
gchar * gw_str_replace_str ( gchar *pattern, gchar *src, gchar *dst);
gchar * gw_str_replace_strv ( gchar *pattern, gchar **src, gchar **dst);
gchar * gw_str_blob_to_regex ( gchar *blob);
gchar ** gw_str_key_words_to_regex ( gchar *key_words);
gint gw_strcmp_strblob ( gchar *str, gchar *blob, gboolean case_sensitive);
gint gw_strcmp_strregex ( gchar *str, gchar *regex, gboolean case_sensitive);
gint gw_strdel_chrsry ( gchar *str, const gchar chr);
gint gw_str_trim_doubled_char ( gchar *str);
gint gw_str_trim ( gchar *str);
gint gw_str_trim2 ( gchar *str);
gint gw_str_trim_left ( gchar *str);
gint gw_str_trim_right ( gchar *str);
gint gw_str_delete_char ( gchar *str, gchar c);
gint gw_str_replace_char ( gchar *string, gchar before, gchar after);
gint gw_str_substr ( const gchar *str, gint begin, gint end, gchar *dest);
gint gw_str_dupsubstr ( const gchar *str, gint begin, gint end, gchar **dest);
gint gw_str_to_lower ( gchar *str);
gint gw_str_to_upper ( gchar *str);
gint gw_str_to_ascii ( gchar *str, gint len);
gint gintlen ( const gint n);
#endif