Index Page ucase_c

A B C D E F G H I J K L M N O P Q R S T U V W X

Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries

#### Procedure

       void ucase_c ( SpiceChar   * in,
                      SpiceInt      lenout,
                      SpiceChar   * out    )

#### Abstract

        Convert the characters in a string to uppercase.

#### Required_Reading

       None.

#### Keywords

        ASCII,  CHARACTER

#### Brief_I/O

        VARIABLE  I/O  DESCRIPTION
        --------  ---  --------------------------------------------------
        in         I   Input string.
        lenout     I   Maximum length of output string.
        out        O   Output string, all uppercase.

#### Detailed_Input

        in          is the input string.

        lenout      is the maximum allowed length of the output string,
                    including the terminating null.

#### Detailed_Output

        out         is the output string. This is the input string
                    with all lowercase letters converted to uppercase.
                    Non-letters are not affected.

                    If

                       lenout < strlen(in)+1

                    the output string will be truncated on the right.

                    A terminating null will be placed in out at position

                       min ( strlen(in),  lenout-1 )

                    unless lenout is less than or equal to zero.

                    out may overwrite in.

#### Parameters

       None.

#### Exceptions

        1) If the input string pointer is null, the error
           SPICE(NULLPOINTER) will be signaled.

        2) If the output string pointer is null, the error
           SPICE(NULLPOINTER) will be signaled.

        3) If lenout is less than or equal to zero, the error
           SPICE(STRINGTOOSHORT) will be signaled.

        4) If the output string is shorter than the input string, the
           result will be truncated on the right.

#### Files

        None.

#### Particulars

        Convert each lowercase character in IN to uppercase.

#### Examples

        "This is an example"   becomes   "THIS IS AN EXAMPLE"
        "12345 +-=? > * $ &"             "12345 +-=? > * $ &"

#### Restrictions

        None.

#### Literature_References

        None.

#### Author_and_Institution

        N.J. Bachman    (JPL)
        K.R. Gehringer  (JPL)
        I.M. Underwood  (JPL)

#### Version

       -CSPICE Version 1.1.0, 26-JAN-2005 (NJB)

           Cast to SpiceInt was applied to strlen output to suppress
           compiler warnings about comparison of signed and unsigned types.

       -CSPICE Version 2.0.0, 26-AUG-1999 (NJB)

          Added string error checks.

       -CSPICE Version 1.0.0, 08-FEB-1998 (NJB)

          Based on SPICELIB Version 1.1.0, 13-MAR-1996 (KRG)

#### Index_Entries

       convert to uppercase

#### Link to routine ucase_c source file ucase_c.c

    Wed Apr  5 17:54:46 2017