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

#include <xtend/string.h>
-lxtend

size_t  str_argv_cat(char *string, char *argv[], size_t first_arg,
size_t string_buff_size)

string              String to which argv elements are appended
argv                Character pointer array to a list of elements
first_arg           Index of first argument to append
string_buff_size    Size of string array including null byte

Append an argv style list of arguments to a string. This is useful for constructing a command to be passed to a shell via system() or similar methods.

Length of string + all argv elements. If this is greater than string_buff_size, then the string has been truncated.

char    cmd[CMD_MAX + 1] = "ls",
        *argv[] = { "-l", NULL };
if ( str_argv_cat(cmd, argv, 0, CMD_MAX + 1) > CMD_MAX + 1 )
    fputs("string is truncated.n", stderr);
else
    system(cmd);

strlcpy(3), strlcat(3), snprintf(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.