Skip to main content
`Ctrl`+`K`

# PetscStrArrayallocpy

Allocates space to hold a copy of an array of strings then copies the strings

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscStrArrayallocpy(const char *const *list, char ***t)

Not Collective; No Fortran Support

## Input Parameter

- list - pointer to array of strings (final string is a `NULL`)

## Output Parameter

- t - the copied array string

## Note

If `t` has previously been allocated then that memory is lost, you may need to `PetscStrArrayDestroy()` the array before calling this routine.

## See Also

`PetscStrallocpy()`, `PetscStrArrayDestroy()`, `PetscStrNArrayallocpy()`

## Level

intermediate

## Location

src/sys/utils/str.c

## Examples

src/ts/tutorials/extchem.c

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages