def stringToCharP(inobject, inlen=None):
if inlen and isinstance(inobject, str):<EOL><INDENT>return create_string_buffer(inobject.encode(encoding='<STR_LIT>'), inlen)<EOL><DEDENT>if isinstance(inobject, bytes):<EOL><INDENT>return inobject<EOL><DEDENT>if isinstance(inobject, c_int):<EOL><INDENT>return stringToCharP("<STR_LIT:U+0020>" * inobject.value)<EOL><DEDENT>if isinstance(inobject, int):<EOL><INDENT>return stringToCharP("<STR_LIT:U+0020>" * inobject)<EOL><DEDENT>return c_char_p(inobject.encode(encoding='<STR_LIT>'))<EOL>
:param inobject: input string, int for getting null string of length of int
:param inlen: optional parameter, length of a given string can be specified
:return: