11.9: Intrinsic Character Operations
- Page ID
- 54312
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)
There are a number of character oriented intrinsic operations. Some of the basic character oriented functions include:
Function | Description |
---|---|
ACHAR(I) | Returns the character represented by integer argument I based on the ASCII table (Appendix A). Integer argument I must be between 1 and 127. |
IACHAR(C) | Returns the integer value of the character argument C represented by ASCII table (Appendix A). |
LEN(STR) | Returns an integer value representing the length of string argument STR. |
LEN_TRIM(STR) | Returns an integer value representing the length of string argument STR excluding any trailing spaces. |
TRIM(STR) | Returns string based on the string argument STR with any trailing spaces removed. |
ADJUSTL(STR) | Return a string modified by removing leading spaces. Spaces are inserted at the end of the string as needed. |
ADJUSTR(STR) | Return a string modified by removing trailing spaces. Spaces are inserted at the beginning of the string as needed. |
A complete list of intrinsic functions can be found in Appendix D.