[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to m4/examples/capitalize.m4,v [branch-1_4]

From: Eric Blake
Subject: Changes to m4/examples/capitalize.m4,v [branch-1_4]
Date: Tue, 02 Oct 2007 22:07:24 +0000

CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      07/10/02 22:07:23

Index: examples/capitalize.m4
RCS file: /sources/m4/m4/examples/capitalize.m4,v
retrieving revision
retrieving revision
diff -u -b -r1.1.1.1 -r1.
--- examples/capitalize.m4      17 Feb 2000 03:03:19 -0000
+++ examples/capitalize.m4      2 Oct 2007 22:07:23 -0000
@@ -1,8 +1,12 @@
-dnl convert to upper- resp. lowercase
+# upcase(text)
+# downcase(text)
+# capitalize(text)
+#   change case of text, simple version
 define(`upcase', `translit(`$*', `a-z', `A-Z')')
 define(`downcase', `translit(`$*', `A-Z', `a-z')')
-dnl capitalize a single word
-define(`capitalize1', `regexp(`$1', `^\(\w\)\(\w*\)', 
-define(`capitalize', `patsubst(`$1', `\w+', ``'capitalize1(`\0')')')
+       `regexp(`$1', `^\(\w\)\(\w*\)',
+               `upcase(`\1')`'downcase(`\2')')')
+define(`capitalize', `patsubst(`$1', `\w+', `_$0(`\&')')')

reply via email to

[Prev in Thread] Current Thread [Next in Thread]