home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.lang.awk
- Path: sparky!uunet!cs.utexas.edu!torn!nott!bnrgate!bcars267!bcars267!emcoop
- From: emcoop@bnr.ca (hume smith)
- Subject: Re: tolower() function?
- In-Reply-To: tbates@austin.ibm.com's message of Mon, 25 Jan 1993 14:39:32 GMT
- Message-ID: <EMCOOP.93Jan25124421@bcars148.bnr.ca>
- Sender: news@bnr.ca (usenet)
- Nntp-Posting-Host: bcars148
- Organization: Bell-Northern Research, Ottawa, Canada
- References: <EMCOOP.93Jan19111755@bcars148.bnr.ca> <C184vr.p5q@austin.ibm.com>
- <1993Jan22.012739.26965@chpc.utexas.edu>
- <1993Jan24.093340.17437@psg.com> <C1EzDw.FtF@austin.ibm.com>
- Date: Mon, 25 Jan 1993 17:44:21 GMT
- Lines: 25
-
- In article <C1EzDw.FtF@austin.ibm.com> tbates@austin.ibm.com (Tom Bates) writes:
-
- 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]
-
- The advantage to using [:upper:] and [:lower:] instead of [A-Z] and [a-z] is
- locale support. Not everyone uses ASCII and US English.
-
- here's a shocker: not all tr's have that notation. must be an IBMism :-)
- --
- Hume Smith Honour sick and davey cris-cross
- hume.smith@acadiau.ca McTruloff sentimie
- emcoop@bnr.ca A parsnip inner pair threes.
-