Table of contents
CSPICE_UCASE converts the characters in an input string
to upper case.
Given:
in the input string.
help, in
STRING = Scalar
the call:
cspice_ucase, in, out
returns:
out the output string.
help, out
STRING = Scalar
This is the input string with all lowercase letters converted
to uppercase. Non-letters are not affected.
None.
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
1) Convert a string of lower case characters to upper case.
Example code begins here.
PRO ucase_ex1
;;
;; A string of lower case characters.
;;
low_string = 'carthago destructus est'
print, 'Input : ', low_string
;;
;; Convert low_string to uppercase.
;;
cspice_ucase, low_string, upper
print, 'Output: ', upper
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
Input : carthago destructus est
Output: CARTHAGO DESTRUCTUS EST
Convert each lowercase character in `in' to uppercase.
The routine allocates memory for the `out' string based on the length of
the `in' string. An `in' string with length zero is an no-op.
IDL native code to perform the same operation:
out = strupcase (in)
1) If the input argument `in' is undefined, an error is signaled
by the IDL error handling system.
2) If the input argument `in' is not of the expected type, or it
does not have the expected dimensions and size, an error is
signaled by the Icy interface.
3) If the output argument `out' is not a named variable, an error
is signaled by the Icy interface.
None.
None.
ICY.REQ
None.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.0.2, 10-AUG-2021 (JDR)
Edited the header to comply with NAIF standard. Added example's
problem statement and reformatted example's output. Moved paragraph
related to memory allocation from -I/O to -Particulars section.
Added -Parameters, -Exceptions, -Files, -Restrictions,
-Literature_References and -Author_and_Institution sections, and
completed -Particulars section.
Removed reference to the routine's corresponding CSPICE header from
-Abstract section.
Added arguments' type and size information in the -I/O section.
-Icy Version 1.0.1, 12-JUL-2005 (EDW)
-I/O header format tweak. No effect on functionality.
-Icy Version 1.0.0, 16-JUN-2003 (EDW)
convert to uppercase
|