home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_200
/
272_01
/
loadstr.doc
< prev
next >
Wrap
Text File
|
1987-04-03
|
1KB
|
41 lines
NAME
loadstr -- load a string with padding
SYNOPSIS
void loadstr(dest, source, qty);
char *dest; string destination
char *source; source string (NULL terminated)
int qty; bytes to place in destination
DESCRIPTION
This function is similar to strcat() in that it copies
a source string to a destination string. However,
if the source string is smaller than "qty", the destination
will be padded to the "qty" parameter with spaces. In
addition, the destination string will NOT be terminated
by a NULL. This is an unusual method of operation, but
handy in some cases.
EXAMPLE
char title[] = "This is a title";
char buffer[128];
loadstr(buffer, title, 80);
buffer[80] = NULL; /* add terminator */
puts(buffer); /* message will be 80 characters long,
** left justified */
This function is found in SMDLx.LIB for the Datalight Compiler