@spiceErrorCheck<EOL>@spiceFoundExceptionThrower<EOL>def kxtrct(keywd, terms, nterms, instring, termlen=_default_len_out, stringlen=_default_len_out, substrlen=_default_len_out):
assert nterms <= len(terms)<EOL>keywd = stypes.stringToCharP(keywd)<EOL>terms = stypes.listToCharArrayPtr([s[:termlen-<NUM_LIT:1>] for s in terms[:nterms]],xLen=termlen,yLen=nterms)<EOL>instring = stypes.stringToCharP(instring[:stringlen-<NUM_LIT:1>],inlen=stringlen)<EOL>substr = stypes.stringToCharP(substrlen)<EOL>termlen = ctypes.c_int(termlen)<EOL>nterms = ctypes.c_int(nterms)<EOL>stringlen = ctypes.c_int(stringlen)<EOL>substrlen = ctypes.c_int(substrlen)<EOL>found = ctypes.c_int()<EOL>libspice.kxtrct_c(keywd, termlen, terms, nterms,<EOL>stringlen, substrlen, instring, ctypes.byref(found),<EOL>substr)<EOL>return stypes.toPythonString(instring), stypes.toPythonString(<EOL>substr), bool(found.value)<EOL>
Locate a keyword in a string and extract the substring from
the beginning of the first word following the keyword to the
beginning of the first subsequent recognized terminator of a list.

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

:param keywd: Word that marks the beginning of text of interest.
:type keywd: str
:param terms: Set of words, any of which marks the end of text.
:type terms: Array of str
:param nterms: Number of terms.
:type nterms: int
:param instring: String containing a sequence of words.
:type instring: str
:param termlen: Length of strings in string array term.
:type termlen: int
:param stringlen: Available space in argument string.
:type stringlen: int
:param substrlen: Available space in output substring.
:type substrlen: int
:return:
        String containing a sequence of words,
        String from end of keywd to beginning of first terms item found.
:rtype: tuple