Current Path : /compat/linux/proc/self/root/usr/local/share/examples/gm4/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/self/root/usr/local/share/examples/gm4/capitalize2.m4 |
divert(`-1') # upcase(text) # downcase(text) # capitalize(text) # change case of text, improved version define(`upcase', `translit(`$*', `a-z', `A-Z')') define(`downcase', `translit(`$*', `A-Z', `a-z')') define(`_arg1', `$1') define(`_to_alt', `changequote(`<<[', `]>>')') define(`_from_alt', `changequote(<<[`]>>, <<[']>>)') define(`_upcase_alt', `translit(<<[$*]>>, <<[a-z]>>, <<[A-Z]>>)') define(`_downcase_alt', `translit(<<[$*]>>, <<[A-Z]>>, <<[a-z]>>)') define(`_capitalize_alt', `regexp(<<[$1]>>, <<[^\(\w\)\(\w*\)]>>, <<[_upcase_alt(<<[<<[\1]>>]>>)_downcase_alt(<<[<<[\2]>>]>>)]>>)') define(`capitalize', `_arg1(_to_alt()patsubst(<<[<<[$*]>>]>>, <<[\w+]>>, _from_alt()`]>>_$0_alt(<<[\&]>>)<<['_to_alt())_from_alt())') divert`'dnl