_strnset, _wcsnset (Windows CE 5.0)

Send Feedback

Developing an Application > Microsoft C Run-time Library for Windows CE > Run-time Library Reference

Initialize characters of a string to a given format.

char *_strnset( char *string, int c, size_t count );wchar_t *_wcsnset( wchar_t *string, wchar_tc, size_tcount );

Parameters

  • string
    String to be altered.
  • c
    Character setting.
  • count
    Number of characters to be set.

Return Values

Each of these functions returns a pointer to the altered string.

Remarks

These functions are supported by all versions of the C run-time libraries.

The _strnset function sets, at most, the first count characters of string to c (converted to char). If count is greater than the length of string, the length of string is used instead of count.

_wcsnset is a wide-character version of _strnset. The string arguments and return value of _wcsnset are wide-character strings. These two functions behave identically otherwise.

The following table shows generic-text routine mappings for this function.

TCHAR.H Routine _UNICODE Defined
_tcsnset _wcsnset

For more information about TCHAR.H routines, see Generic Text Mappings.

Requirements

OS Versions: Windows CE 2.0 and later.

Header: stdio.h, string.h.

Link Library: coredll.dll.

See Also

strcat | strcmp | strcpy

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.