diff options
Diffstat (limited to 'private/ole32/stg/ref/wcslen.c')
-rw-r--r-- | private/ole32/stg/ref/wcslen.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/private/ole32/stg/ref/wcslen.c b/private/ole32/stg/ref/wcslen.c new file mode 100644 index 000000000..333b34128 --- /dev/null +++ b/private/ole32/stg/ref/wcslen.c @@ -0,0 +1,39 @@ +/*** +*wcslen.c - contains wcslen() routine +* +* Copyright (c) 1985-1988, Microsoft Corporation. All Rights Reserved. +* +*Purpose: +* wcslen returns the length of a null-terminated string in number of +* wide characters, not including the null wide character itself. +* +*******************************************************************************/ + +#include <wchar.h> + +/*** +*wcslen - return the length of a null-terminated string +* +*Purpose: +* Finds the number of wide characters in the given wide character +* string, not including the final null character. +* +*Entry: +* const wchat_t * str - string whose length is to be computed +* +*Exit: +* length of the string "str", exclusive of the final null wide character +* +*Exceptions: +* +*******************************************************************************/ + +size_t _CRTAPI1 wcslen(const wchar_t * str) +{ + wchar_t *string = (wchar_t *) str; + + while( *string ) + string++; + + return string - str; +} |