home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / lang / awk / 21 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.6 KB  |  45 lines

  1. Newsgroups: alt.lang.awk
  2. Path: sparky!uunet!cs.utexas.edu!geraldo.cc.utexas.edu!portal.austin.ibm.com!awdprime.austin.ibm.com!tbates
  3. From: tbates@austin.ibm.com (Tom Bates)
  4. Subject: Re: tolower() function?
  5. Originator: tbates@rama.austin.ibm.com
  6. Message-ID: <C1EzDw.FtF@austin.ibm.com>
  7. Sender: tbates@austin.ibm.com ()
  8. Date: Mon, 25 Jan 1993 14:39:32 GMT
  9. References: <EMCOOP.93Jan19111755@bcars148.bnr.ca> <C184vr.p5q@austin.ibm.com> <1993Jan22.012739.26965@chpc.utexas.edu> <1993Jan24.093340.17437@psg.com>
  10. Organization: IBM Austin
  11. Lines: 32
  12.  
  13.  
  14. In article <1993Jan24.093340.17437@psg.com>, edw@psg.com (Ed Wright) writes:
  15. > In article <1993Jan22.012739.26965@chpc.utexas.edu> rshouman@chpc.utexas.edu (Radey Shouman) writes:
  16. > >In article <C184vr.p5q@austin.ibm.com> tbates@austin.ibm.com (Tom Bates)
  17. > >writes:
  18. > >
  19. > >>Quoting "The AWK Programming Language",
  20. > >>
  21. > >>    "The cleanest way to do case conversion in awk is with an array that
  22. > >>maps each letter...it's better to use...tr"
  23. > >>
  24. > >>I often use tr for this very reason. For example:
  25. > >>
  26. > >>    echo "HeLlO, wOrLd!" | tr [:upper:] [:lower]
  27. >  try                         | tr [A-Z] [a-z]
  28. > -- 
  29. >  REAL RADIOS             edw@m2xenix.psg.com            GLOW IN THE DARK
  30. >         ^^^^^^^^^^^^^^^^^^^^^^^^<<^^>>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  31. >     >>No Voice>>>>>> Amateur Radio   KA9AHQ @ 28.340  <<<<<<<No Vice<<
  32. >   >>> Kshatriya Auscultating 9 Ailurophiles Hypothesizing Quodlibets <<<
  33.  
  34.  
  35. The advantage to using [:upper:] and [:lower:] instead of [A-Z] and [a-z] is
  36. locale support.  Not everyone uses ASCII and US English.
  37.  
  38. Sincerely,
  39. Tom
  40. -- 
  41. Tom Bates
  42.  
  43. IBM Austin
  44.  
  45.