/**********************************************************************
 
	Copyright (C) 2003 Hirohisa MORI <joshua@nichibun.ac.jp>
 
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the GLOBALBASE 
	Library General Public License (G-LGPL) as published by 

	http://www.globalbase.org/
 
	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.

**********************************************************************/



#include	"utils.h"


int
cmp_part(L_CHAR * target,L_CHAR * data)
{
int len_target,len_data;
int ofs;

	len_target = l_strlen(target);
	len_data = l_strlen(data);
	for ( ofs = 0 ; ofs <= len_target - len_data ; ofs ++ ) {
		if ( memcmp(&target[ofs],data,len_data*sizeof(L_CHAR)) == 0 )
			return 1;
	}
	return 0;
}

