petsc-3.7.1 2016-05-15
Report Typos and Errors

PetscStrToArray

Separates a string by a charactor (for example ' ' or '\n') and creates an array of strings

Synopsis

#include "petscsys.h"   
PetscErrorCode  PetscStrToArray(const char s[],char sp,int *argc,char ***args)
Not Collective Many br

Input Parameters

s - pointer to string Many br
sp - separator charactor Many br

Output Parameter

argc - the number of entries in the array Many br
args - an array of the entries with a null at the end Many br

Many br

Notes: this may be called before PetscInitialize() or after PetscFinalize() Many br

Not for use in Fortran Many br

Developer Notes: Using raw malloc() and does not call error handlers since this may be used before PETSc is initialized. Used Many brto generate argc, args arguments passed to MPI_Init() Many br

See Also

PetscStrToArrayDestroy(), PetscToken, PetscTokenCreate()

Level:intermediate
Location:
src/sys/utils/str.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages