/*
This source file is part of Scol
For the latest info, see http://www.scolring.org

Copyright (c) 2010 Stephane Bisaro, aka Iri <iri@irizone.net>

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser 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, or go to
http://www.gnu.org/copyleft/lesser.txt

For others informations, please contact us from http://www.scolring.org/
*/


#ifndef __LIB_STRING_H__
#define __LIB_STRING_H__
/*
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
*/
#include <ctype.h>
#include "main.h"

struct LibString_List
{
    char *word;
    struct LibString_List *pNext;
};


void lib_string_removePrefix (char **str, const char * prefix);
void lib_string_addPrefix (char **str, const char * prefix);

void lib_string_addSuffixChar (char ** str, const char suffix);

int lib_string_indexstr (const char *cs, const char *ct);
int lib_string_indexchar (const char *cs, const char ct);

void lib_string_getListeFromStringWithDelimiter (struct LibString_List *list, char *first, const char *sep);
void lib_string_freeListeFromStringWithDelimiter (struct LibString_List *list);

char * replaceChar (char *s, char cin, char cout);
char * lib_string_scan_dir_file (DIR *dir, const char *name, char *path, char *out);
int lib_string_scan_dir_file2 (char *path, const char *name, char **out);
int lib_string_isLastChar (const char *s, const char c);
int nisalnum (char *s, int n);

#endif /* __LIB_STRING_H__ */

