🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.lang.awk
Article #19

Re: tolower() function?

#19
From: Tom Bates
Date: Mon, 25 Jan 1993 14:39
31 lines
1668 bytes
In article <1993Jan24.093340.17437@psg.com>, edw@psg.com (Ed Wright) writes:
> In article <1993Jan22.012739.26965@chpc.utexas.edu> rshouman@chpc.utexas.edu (Radey Shouman) writes:
> >In article <C184vr.p5q@austin.ibm.com> tbates@austin.ibm.com (Tom Bates)
> >writes:
> >
> >>Quoting "The AWK Programming Language",
> >>
> >>	"The cleanest way to do case conversion in awk is with an array that
> >>maps each letter...it's better to use...tr"
> >>
> >>I often use tr for this very reason. For example:
> >>
> >>	echo "HeLlO, wOrLd!" | tr [:upper:] [:lower]
>  try                         | tr [A-Z] [a-z]
> -- 
>  REAL RADIOS             edw@m2xenix.psg.com            GLOW IN THE DARK
>         ^^^^^^^^^^^^^^^^^^^^^^^^<<^^>>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     >>No Voice>>>>>> Amateur Radio   KA9AHQ @ 28.340  <<<<<<<No Vice<<
>   >>> Kshatriya Auscultating 9 Ailurophiles Hypothesizing Quodlibets <<<


The advantage to using [:upper:] and [:lower:] instead of [A-Z] and [a-z] is
locale support.  Not everyone uses ASCII and US English.

Sincerely,
Tom
-- 
Tom Bates

IBM Austin
Technical Details
Message-ID: <C1EzDw.FtF@austin.ibm.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!geraldo.cc.utexas.edu!portal.austin.ibm.com!awdprime.austin.ibm.com!tbates
References: <EMCOOP.93Jan19111755@bcars148.bnr.ca> <C184vr.p5q@austin.ibm.com> <1993Jan22.012739.26965@chpc.utexas.edu> <1993Jan24.093340.17437@psg.com>

Show Full Headers
Complete Article Headers
Newsgroups: alt.lang.awk
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!geraldo.cc.utexas.edu!portal.austin.ibm.com!awdprime.austin.ibm.com!tbates
From: tbates@austin.ibm.com (Tom Bates)
Subject: Re: tolower() function?
Originator: tbates@rama.austin.ibm.com
Message-ID: <C1EzDw.FtF@austin.ibm.com>
Sender: tbates@austin.ibm.com ()
Date: Mon, 25 Jan 1993 14:39:32 GMT
References: <EMCOOP.93Jan19111755@bcars148.bnr.ca> <C184vr.p5q@austin.ibm.com> <1993Jan22.012739.26965@chpc.utexas.edu> <1993Jan24.093340.17437@psg.com>
Organization: IBM Austin
Lines: 32