astChrSplitastChrSplit - Extract words from a supplied string

Description:
This function extracts all space-separated words form the supplied string and returns them in an array of dynamically allocated strings.
Synopsis:
char $*$$*$astChrSplit_( const char $*$str, int $*$n )
Parameters:
str
Pointer to the string to be split.
n
Address of an int in which to return the number of words returned.
Returned Value:
astChrSplit()
A pointer to a dynamically allocated array containing "$*$n" elements. Each element is a pointer to a dynamically allocated character string containing a word extracted from the supplied string. Each of these words will have no leading or trailing white space.
Notes:
  • A NULL pointer is returned if this function is invoked with the global error status set or if it should fail for any reason, or if the supplied string contains no words.