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
xt_strlcpy(3) FreeBSD Library Functions Manual xt_strlcpy(3)

xt_strcpy() - Copy a string without risk of buffer overflow

#include <xtend/string.h>
-lxtend

size_t  xt_strlcpy(char * restrict dest, const char * restrict src,
size_t dstsize)

dest:   Pointer to a character array of at least len dstsize, where
the possibly modified string is stored.
src:    Point to a character array containing the string to compact
dstsize: Length of the dest array

Copy string src to dest, truncating to a maximum length of dstsize if necessary.

The length of the source string. If the return value is larger than the dstsize, then truncation has occurred.

#define MAXLEN  127
char    limited_str[MAXLEN + 1],

original_str[SOME_OTHER_LEN + 1]; xt_strcpy(limited_str, original_str, MAXLEN + 1);

xt_strlsqueeze(3), xt_strlcat(3)


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.