Beispiel #1
0
char *
STrindex_SB(
	const char	*str,
	const char	*mstr,
	register size_t	len)
{
	char	*where = NULL;

	if (len <= 0)
		len = MAXI2;

	while (len > 0 && *str != '\0')
	{
		if (CMcmpcase_SB(str, mstr) == 0)
			where = (char *)str;

		CMbytedec_SB(len, str);
		CMnext_SB(str);
	}

	if (where != NULL && *where != '\0')
		return (where);
	else
		return (NULL);
}
Beispiel #2
0
char *
STindex_SB(
	const char	*str,
	const char	*mstr,
	size_t	len)
{
	if (str == NULL || mstr == NULL)
		return (NULL);

	if (len <= 0)
		len = 32767;

	while (len > 0 && *str != '\0')
	{
		if (CMcmpcase_SB(str, mstr) == 0)
			return ((char *)str);

		CMbytedec_SB(len, str);
		CMnext_SB(str);
	}

	return (NULL);
}