ReactOS 0.4.16-dev-300-g2aadf2e
mbsstr.c
Go to the documentation of this file.
1#include <mbstring.h>
2#include <stdlib.h>
3
4/*
5 * @implemented
6 */
7unsigned char *_mbsstr(const unsigned char *src1,const unsigned char *src2)
8{
9 size_t len;
10
11 if (src2 ==NULL || *src2 == 0)
12 return (unsigned char *)src1;
13
14 len = _mbslen(src2);
15
16 while(*src1)
17 {
18 if ((*src1 == *src2) && (_mbsncmp(src1,src2,len) == 0))
19 return (unsigned char *)src1;
20 src1 = (unsigned char *)_mbsinc(src1);
21 }
22 return NULL;
23}
#define NULL
Definition: types.h:112
GLenum GLsizei len
Definition: glext.h:6722
_Check_return_ _CRTIMP size_t __cdecl _mbslen(_In_z_ const unsigned char *_Str)
_Check_return_ _CRTIMP unsigned char *__cdecl _mbsinc(_In_z_ const unsigned char *_Ptr)
_Check_return_ _CRTIMP int __cdecl _mbsncmp(_In_z_ const unsigned char *_Str1, _In_z_ const unsigned char *_Str2, _In_ size_t _MaxCount)
unsigned char * _mbsstr(const unsigned char *src1, const unsigned char *src2)
Definition: mbsstr.c:7