X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fwchar%2Fwcslen.c;fp=functions%2Fwchar%2Fwcslen.c;h=d5d878dd23fdb365098e88401b394e2cf7e008f6;hb=10f020f1a39804bbef8cd1cf35ef7c9a8e75c7d6;hp=0000000000000000000000000000000000000000;hpb=f7a440b9c7bb0c686dc2368c4ff53b20bf6371f8;p=pdclib.old diff --git a/functions/wchar/wcslen.c b/functions/wchar/wcslen.c new file mode 100644 index 0000000..d5d878d --- /dev/null +++ b/functions/wchar/wcslen.c @@ -0,0 +1,29 @@ +/* wcslen( const wchar_t * ); + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include + +#ifndef REGTEST + +size_t wcslen( const wchar_t * str ) +{ + size_t n = 0; + while(*(str++)) n++; + return n; +} + + +#endif + +#ifdef TEST +#include <_PDCLIB_test.h> + +int main( void ) +{ + return TEST_RESULTS; +} + +#endif