src/pspg.c
const char *
pspg_search(Options *opts, ScrDesc *scrdesc, const char *str)
{
	bool	ignore_case = opts->ignore_case;
	bool	ignore_lower_case = opts->ignore_lower_case;
	bool	has_upperchr = scrdesc->has_upperchr;
	const char *searchterm = scrdesc->searchterm;
	const char *result;

	if (ignore_case || (ignore_lower_case && !has_upperchr))
	{
		result = use_utf8 ? utf8_nstrstr(str, searchterm) : nstrstr(str, searchterm);
	}
	else if (ignore_lower_case && has_upperchr)
	{
		result = use_utf8 ?
						utf8_nstrstr_ignore_lower_case(str, searchterm) :
						nstrstr_ignore_lower_case(str, searchterm);
	}
	else
		result = strstr(str, searchterm);

	return result;
}
/*
 * Multiple used block - searching in string based on configuration
 */
Multiple used block - searching in string based on configuration
Multiple used block - searching in string based on configuration
const char *
pspg_search(Options *opts, ScrDesc *scrdesc, const char *str)
{
	bool	ignore_case = opts->ignore_case;
	bool	ignore_lower_case = opts->ignore_lower_case;
	bool	has_upperchr = scrdesc->has_upperchr;
	const char *searchterm = scrdesc->searchterm;
	const char *result;
	if (ignore_case || (ignore_lower_case && !has_upperchr))
	{
		result = use_utf8 ? utf8_nstrstr(str, searchterm) : nstrstr(str, searchterm);
	}
	else if (ignore_lower_case && has_upperchr)
	{
		result = use_utf8 ?
						utf8_nstrstr_ignore_lower_case(str, searchterm) :
						nstrstr_ignore_lower_case(str, searchterm);
	}
	else
		result = strstr(str, searchterm);
	return result;
}
const char * pspg_search ( Options * opts , ScrDesc * scrdesc , const char * str ) { bool ignore_case = opts -> ignore_case ; bool ignore_lower_case = opts -> ignore_lower_case ; bool has_upperchr = scrdesc -> has_upperchr ; const char * searchterm = scrdesc -> searchterm ; const char * result ; if ( ignore_case || ( ignore_lower_case && ! has_upperchr ) ) { result = use_utf8 ? utf8_nstrstr ( str , searchterm ) : nstrstr ( str , searchterm ) ; } else if ( ignore_lower_case && has_upperchr ) { result = use_utf8 ? utf8_nstrstr_ignore_lower_case ( str , searchterm ) : nstrstr_ignore_lower_case ( str , searchterm ) ; } else result = strstr ( str , searchterm ) ; return result ; }
Multiple used block - searching in string based on configuration
Multiple used block - searching in string based on configuration