X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fuchar%2F_PDCLIB_c16slen.c;fp=functions%2Fuchar%2F_PDCLIB_c16slen.c;h=6652b3a78e9e055e394b38da1199a8c3f92c7c88;hb=0d3e870e0f3b021248d55fa24473d17fa6bb814a;hp=0000000000000000000000000000000000000000;hpb=54ff6bfdb6ea586d3a9cb67c2ea1c82d286f8cd1;p=pdclib diff --git a/functions/uchar/_PDCLIB_c16slen.c b/functions/uchar/_PDCLIB_c16slen.c new file mode 100644 index 0000000..6652b3a --- /dev/null +++ b/functions/uchar/_PDCLIB_c16slen.c @@ -0,0 +1,28 @@ +/* _PDCLIB_c16slen( const char16_t * ); + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#ifndef REGTEST +#include + +size_t _PDCLIB_c16slen( const char16_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