3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: services/fs/vfat/string.c
6 * PURPOSE: VFAT Filesystem
7 * PROGRAMMER: Jason Filby (jasonfilby@yahoo.com)
11 /* INCLUDES *****************************************************************/
13 #include <ddk/ntddk.h>
21 /* FUNCTIONS ****************************************************************/
23 BOOLEAN wstrcmpjoki(PWSTR s1, PWSTR s2)
25 * FUNCTION: Compare two wide character strings, s2 with jokers (* or ?)
26 * return TRUE if s1 like s2
29 while ((*s2=='*')||(*s2=='?')||(towlower(*s1)==towlower(*s2)))
31 if ((*s1)==0 && (*s2)==0)
37 if (wstrcmpjoki(s1,s2)) return TRUE;
48 for (;((*s2)=='.')||((*s2)=='*')||((*s2)=='?');s2++) {}
50 if ((*s1)==0 && (*s2)==0)
56 vfatGetNextPathElement (PWCHAR pFileName)
58 if (*pFileName == L'\0')
63 while (*pFileName != L'\0' && *pFileName != L'\\')
72 vfatWSubString (PWCHAR pTarget, const PWCHAR pSource, size_t pLength)
74 wcsncpy (pTarget, pSource, pLength);
75 pTarget [pLength] = L'\0';
79 vfatIsFileNameValid (PWCHAR pFileName)
86 if (*c == L'*' || *c == L'?')