BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

karray_to_string - convert a string array into a single big string

LIBRARY CALL

char *karray_to_string(
   char   **array,
   int      type,
   size_t   num,
   char    *separator)

INPUT

OUTPUT

none

RETURN VALUE

The newly created string on success, NULL on failure

DESCRIPTION

Creates one big string from an array of strings.

While most of the array routines support a variety of data types, karray_to_string() requires a string array. Arrays of other data types are not supported as of yet.

A specified separation string is inserted between each pair of strings in the array. For example, if the input array had the contents: array[0] = "ls" array[1] = "-a" array[2] = "/tmp"

and the 'separator' parameter was specified as " ", then the string returned will be: "ls -a /tmp"

If the 'separator' parameter was passed in as NULL, then the resulting string would be: "ls-a/tmp"

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$BOOTSTRAP/objects/library/kutils/src/array.c

SEE ALSO

kutils(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.