mirror of
https://github.com/reactos/reactos.git
synced 2025-06-25 11:59:45 +00:00
[UCRT] Import Microsoft.Windows.SDK.CRTSource version 10.0.22621.3
Imported from https://www.nuget.org/packages/Microsoft.Windows.SDK.CRTSource/10.0.22621.3 License: MIT
This commit is contained in:
parent
f1b60c66f0
commit
04e0dc4a7a
568 changed files with 115483 additions and 0 deletions
24
sdk/lib/ucrt/string/wcsncnt.cpp
Normal file
24
sdk/lib/ucrt/string/wcsncnt.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
//
|
||||
// wcsncnt.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Defines __wcsncnt(), which returns the number of characters in a string. If
|
||||
// the string is longer than the given 'count', 'count' is returned.
|
||||
//
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
extern "C" size_t __cdecl __wcsncnt(
|
||||
wchar_t const* const string,
|
||||
size_t const count
|
||||
)
|
||||
{
|
||||
wchar_t const* it = string;
|
||||
size_t n = 0;
|
||||
|
||||
for (; *it && n != count; ++it, ++n) { }
|
||||
|
||||
return n;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue