GNU Info

Info Node: (m4.info)Substr

(m4.info)Substr


Next: Translit Prev: Regexp Up: Text handling
Enter node , (file) or (file)node

Extracting substrings
=====================

   Substrings are extracted with `substr':

     substr(STRING, FROM, opt LENGTH)

which expands to the substring of STRING, which starts at index FROM,
and extends for LENGTH characters, or to the end of STRING, if LENGTH
is omitted.  The starting index of a string is always 0.

     substr(`gnus, gnats, and armadillos', 6)
     =>gnats, and armadillos
     substr(`gnus, gnats, and armadillos', 6, 5)
     =>gnats

   The builtin macro `substr' is recognized only when given arguments.


automatically generated by info2www version 1.2.2.9