| ljucrs |
|
Table of contents
Procedure
LJUCRS ( Left-justify, Uppercase, Compress )
SUBROUTINE LJUCRS ( N, INPUT, OUTPUT )
Abstract
Left-justify, uppercase, and space-compress a character string.
Required_Reading
None.
Keywords
ASCII
CHARACTER
STRING
Declarations
IMPLICIT NONE
INTEGER N
CHARACTER*(*) INPUT
CHARACTER*(*) OUTPUT
Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
N I Maximum consecutive occurrences of space.
INPUT I Input string.
OUTPUT O Output string.
Detailed_Input
N is the maximum number of consecutive occurrences
of space that will be allowed to remain in the
output string.
INPUT is the input string.
Detailed_Output
OUTPUT is the output string. This is the input string that
left-justified and with all occurrences of more than
N consecutive spaces removed.
If OUTPUT is not large enough to hold the
compressed string, it is truncated on the right.
OUTPUT may overwrite INPUT.
Parameters
None.
Exceptions
Error free.
Files
None.
Particulars
The string is left-justified and uppercased. Occurrences of more
than N consecutive spaces are removed from the input string as it
is copied to the output string. If the output string is not large
enough to hold the compressed string, it is truncated on the
right.
Examples
Let N = 1. Then
' Abc DE F ', becomes 'ABC DE F',
Restrictions
None.
Literature_References
None.
Author_and_Institution
J. Diaz del Rio (ODC Space)
B.V. Semenov (JPL)
Version
SPICELIB Version 1.1.0, 12-AUG-2021 (JDR)
Added IMPLICIT NONE statement.
Edited the header to comply with NAIF standard.
SPICELIB Version 1.0.0, 29-JUL-2013 (BVS)
|
Fri Dec 31 18:36:31 2021