[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] 0 is invalid as number of arguments for tolower
From: |
peifer |
Subject: |
Re: [bug-gawk] 0 is invalid as number of arguments for tolower |
Date: |
Wed, 14 Oct 2015 13:33:48 +0200 |
Arnold wrote:
> To do this you'll have to do it manually, but splitting the line
> apart around the match, lowering the bit of interest, and putting
> it back together. You can probably put together a function
> that will do this for you.
>
Thanks for confirming that I was really too naive ;-). Being a poor farmer's
son, I invented the ugly gsub() chain below, rather than a function-based
solution.
@Stéphane: Thanks. Next time, I'll do it more elegantly, as you and Arnold
proposed. Promised.
By the way, this pages seems incomplete:
http://lists.gnu.org/archive/html/bug-gawk/2015-10/index.html
Hermann
# English issues
gsub(/ And /, " and ", str)
gsub(/ Of /, " of ", str)
# France
gsub(/ La /, " la ", str)
gsub(/ Le /, " le ", str)
gsub(/ Les /, " les ", str)
gsub(/ De /, " de ", str)
gsub(/ Du /, " du ", str)
gsub(/ Et /, " et ", str)
gsub(/ Côtiers /, " côtiers ", str)
gsub(/ Fleuves /, " fleuves ", str)
gsub(/ Bretons/, " bretons", str)
gsub(/ Normands/, " normands", str)
gsub(/ Vendéens/, " vendéens", str)
gsub(/ Charentais/, " charentais", str)
gsub(/ Aquitains/, " aquitains", str)