@spiceErrorCheck<EOL>def orderc(array, ndim=None):
if ndim is None:<EOL><INDENT>ndim = ctypes.c_int(len(array))<EOL><DEDENT>else:<EOL><INDENT>ndim = ctypes.c_int(ndim)<EOL><DEDENT>lenvals = ctypes.c_int(len(max(array, key=len)) + <NUM_LIT:1>)<EOL>iorder = stypes.emptyIntVector(ndim)<EOL>array = stypes.listToCharArray(array, lenvals, ndim)<EOL>libspice.orderc_c(lenvals, array, ndim, iorder)<EOL>return stypes.cVectorToPython(iorder)<EOL>
Determine the order of elements in an array of character strings.

http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderc_c.html

:param array: Input array.
:type array: Array of strings.
:param ndim: Optional Length of input array
:type ndim: int
:return: Order vector for array.
:rtype: array of ints