This appears to be a function provided by the QNX operating system, and is also found in Borland's Turbo C.
If you're not worried about supporting Unicode, UTF-8 or other double-byte character sets, you can just use memset and pass it the same arguments.
The only difference between the two is that memset allows you to put characters that are more than one byte long into a string; libc currently doesn't support multi-byte characters (someone please correct me if I'm wrong!) so you won't find an efficient strnset function on GNU/Linux (yet).
|