#### Description:

This function converts a supplied string to upper or lower case, storing the result in dynamically allocated memory. The astChrCase function is similar, but stores the result in a supplied buffer.

#### Synopsis

char ∗astStringCase( const char string, int upper )

#### Parameters:

##### string

Pointer to the null terminated string to be converted.

##### upper

If non-zero, the string is converted to upper case. Otherwise it is converted to lower case.

#### Returned Value

##### astStringCase()

If successful, the function returns a pointer to the start of the allocated string. The returned memory should be freed using astFree when no longer needed.

#### Notes:

- A pointer value of NULL is returned if this function is invoked with the global error status set or if it fails for any reason.

Copyright (C) 2021 East Asian Observatory