REXX Tips & Tricks, Version 2.80


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


Uppercase & Lowercase including German "Umlaute"





 
/* sample code to translate a string to uppercase or lowercase which  */
/* also handles the German "Umlaute"                                  */
/* Note that there's an country-dependent uppercase translation v1.80 */
/* routine in the new REXXUTIL DLL. Object-Oriented REXX             */
    say "Lower() " lower( "AbcdEF Ö Ä Ü ß 1234567890" )
    say "Upper() " upper( "aBcDef ö ä ü ß 1234567890" )
exit

/* ------------------------------------------------------------------ */
/* function: Convert a char or string to uppercase                    */
/*                                                                    */
/* call:     Upper string                                             */
/*                                                                    */
/* where:    string - string to convert                               */
/*                                                                    */
/* returns:  the converted string                                     */
/*                                                                    */
/* note:     This implementation handles German "Umlaute"             */
/*                                                                    */
Upper: PROCEDURE
  parse arg thisString

RETURN translate( thisString, "ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜß" ,,
                              "abcdefghijklmnopqrstuvwxyzäöüß" )

/* ------------------------------------------------------------------ */
/* function: Convert a char or string to lowercase                    */
/*                                                                    */
/* call:     Lower string                                             */
/*                                                                    */
/* where:    string - string to convert                               */
/*                                                                    */
/* returns:  the converted string                                     */
/*                                                                    */
/* note:     This implementation handles German "Umlaute"             */
/*                                                                    */
Lower: PROCEDURE
  parse arg thisString

RETURN translate( thisString,  "abcdefghijklmnopqrstuvwxyzäöüß" ,,
                               "ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜß" )

  

Inf-HTML End Run - Successful