Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

8.3.4 Text processing Macros

The following macros may be used to manipulate strings in M4. They are not intended for casual use.

— Macro: m4_re_escape (string)

Backslash-escape all characters in string that are active in regexps.

— Macro: m4_tolower (string)
— Macro: m4_toupper (string)

Return string with letters converted to upper or lower case, respectively.

— Macro: m4_split (string, [regexp])

Split string into an M4 list of elements quoted by ‘[’ and ‘]’, while keeping white space at the beginning and at the end. If regexp is given, use it instead of ‘[\t ]+’ for splitting. If string is empty, the result is an empty list.

— Macro: m4_normalize (string)

Remove leading and trailing spaces and tabs, sequences of backslash-then-newline, and replace multiple spaces and tabs with a single space.

— Macro: m4_append (macro-name, string, [separator])
— Macro: m4_append_uniq (macro-name, string, [separator])

Redefine macro-name to its former contents with separator and string added at the end. If macro-name was undefined before (but not if it was defined but empty), then no separator is added. m4_append can be used to grow strings, and m4_append_uniq to grow strings without duplicating substrings.


 
 
  Published under the terms of the GNU General Public License Design by Interspire