summaryrefslogtreecommitdiff
path: root/checks/177.patsubst
blob: 51b8da56a5d80087d4d6680e1c1bb35a0d0b09f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
dnl @ ../doc/m4.texinfo:5979: Origin of test
dnl @ expected status: 0
dnl @ extra options: 
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
dnl @ Foundation, Inc.
dnl @ This file is free software; the Free Software Foundation
dnl @ gives unlimited permission to copy and/or distribute it
dnl @ with or without modifications, as long as this notice
dnl @ is preserved.
undivert(`capitalize.m4')dnl
dnl @result{}divert(`-1')
dnl @result{}# upcase(text)
dnl @result{}# downcase(text)
dnl @result{}# capitalize(text)
dnl @result{}#   change case of text, simple version
dnl @result{}define(`upcase', `translit(`$*', `a-z', `A-Z')')
dnl @result{}define(`downcase', `translit(`$*', `A-Z', `a-z')')
dnl @result{}define(`_capitalize',
dnl @result{}       `regexp(`$1', `^\(\w\)\(\w*\)',
dnl @result{}               `upcase(`\1')`'downcase(`\2')')')
dnl @result{}define(`capitalize', `patsubst(`$1', `\w+', `_$0(`\&')')')
dnl @result{}divert`'dnl