/sys$common/syshlp/TPUHELP.HLB  —  CHANGE_CASE
  CHANGE_CASE

     Changes the case of all alphabetic characters in a buffer, range, or
     string, according to the keyword that you specify.

     Optionally, returns a string, range, or buffer containing the changed
     text.

  SYNTAX

     [returned_buffer |
      returned_range  |
      returned_string  := ] CHANGE_CASE ({buffer | range | string},
                                         {LOWER | UPPER | INVERT},
                                         [IN_PLACE | NOT_IN_PLACE])

  PARAMETERS

      buffer            The buffer in which you want DECTPU to change the
                        case.  Note that you cannot use the keyword
                        NOT_IN_PLACE if you specify a buffer for the first
                        parameter.

      range             The range in which you want DECTPU to change the
                        case.  Note that you cannot use the keyword
                        NOT_IN_PLACE if you specify a range for the first
                        parameter.

      string            The string in which you want DECTPU to change the
                        case.  If you specify IN_PLACE for the third
                        parameter, CHANGE_CASE makes the specified change to
                        the string specified in the first parameter.
                        CHANGE_CASE has no effect on string constants.

      LOWER             A keyword directing DECTPU to change letters to all
                        lowercase.

      UPPER             A keyword directing DECTPU to change letters to all
                        uppercase.

      INVERT            A keyword directing DECTPU to change uppercase
                        letters to lowercase, and lowercase letters to
                        uppercase.

      IN_PLACE          A keyword directing DECTPU to make the indicated
                        change in the buffer, range, or string specified.
                        This is the default.

      NOT_IN_PLACE      A keyword directing DECTPU to leave the specified
                        string unchanged and return a string that is the
                        result of the specified change in case.  You cannot
                        use NOT_IN_PLACE if the first parameter is specified
                        as a range or buffer.  To use NOT_IN_PLACE, you must
                        specify a return value for CHANGE_CASE.

      returned_buffer   A variable of type buffer pointing to the buffer
                        containing the modified text, if you specify a
                        buffer for the first parameter.  The variable
                        "returned_buffer" points to the same buffer pointed
                        to by the buffer variable specified as the first
                        parameter.

      returned_range    A range containing the modified text, if you specify
                        a range for first parameter.  The returned range
                        spans the same text as the range specified as a
                        parameter, but they are two separate ranges.  If you
                        subsequently change or delete one of the ranges,
                        this has no effect on the other range.

      returned_string   A string containing the modified text, if you
                        specify a string for the first parameter.

  EXAMPLES

     1.  CHANGE_CASE (main_buffer, UPPER);

         Makes all characters in the main buffer uppercase.  If you enter
         this on the command line and if the buffer is associated with a
         visible window, you will see the changes take effect immediately.

     2.  returned_value := CHANGE_CASE (CURRENT_BUFFER, LOWER, IN_PLACE);

         Makes all characters in the current buffer lowercase.  The variable
         returned_value contains the newly modified current buffer.

     3.  returned_value := CHANGE_CASE (the_string, INVERT, NOT_IN_PLACE);

         Inverts the case of all characters in the string pointed to by
         "the_string", and returns the modified string in the variable
         "returned_value".

  Related Topic

     EDIT    TRANSLATE
Close Help