GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
STRINIT(3) C Programmer's Manual STRINIT(3)

strinit - initialize a string with a given character to a given length

#include <publib.h>
char *strinit(char *s, int c, size_t len) {

strinit initializes the string pointed to by s to be of length len, all characters being c, where the terminating '\0' is not included in the length, i.e., the string will use len+1 characters.

strinit will return s.

To initialize a string to consist of twenty underscores, one would do the following.


#include <publib.h> char string[21]; /* note 21 to make room for '\0' */ strinit(string, '_', 20);

publib(3)

Lars Wirzenius (lars.wirzenius@helsinki.fi)
C Programmer's Manual Publib

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.