FUNCTION str2chars, str, STR_INDLO = str_indlo, STR_INDHI = str_indhi ; Description: This function splits a string "str" into a vector of characters, with ; the option of only extracting the characters corresponding to a ; substring between the string position indices "str_indlo" and ; "str_indhi". ; ; Input Parameters: ; ; str - STRING - The string for which the characters are to be extracted. ; ; Return Value: ; ; The function returns a vector of STRINGS where each element is a string consisting ; of one character. The ith element of the return vector corresponds to the ith ; character in "str". ; ; Keywords: ; ; If the keyword STR_INDLO is set to an INTEGER (or LONG) value, then only the ; characters at or after the string index position specified by this keyword will ; be extracted. If this keyword has a value that is out of range for the input ; string "str", then it will be ignored. ; ; If the keyword STR_INDHI is set to an INTEGER (or LONG) value, then only the ; characters at or before the string index position specified by this keyword will ; be extracted. If this keyword has a value that is out of range for the input ; string "str", then it will be ignored. ; ; Author: Dan Bramich (dmb@ing.iac.es) ; ; History: ; ; 14/01/2009 - Module created (dmb) ;If "str" is not a scalar string, then return an empty string ;If "str" is an empty string, then return an empty string ;If the keyword STR_INDLO is set, then check that it makes sense ;If the keyword STR_INDHI is set, then check that it makes sense ;Extract the required vector of characters from the input string ;Return the required vector of characters