Next: , Previous: , Up: preprocessor   [Contents][Index]


2.8 Manipulating strings with macros

Preprocessor Macros: mbfl_string_len (VAR)

Expands into the expression:

${#VAR}

which evaluates to the number of characters in the string in the variable VAR.

Preprocessor Macros: mbfl_string_idx (VAR, EXPR)

Expands into the expression:

${VAR:EXPR:1}

which evaluates to the character at index EXPR in the string in the variable VAR.


Next: , Previous: , Up: preprocessor   [Contents][Index]

This document describes version 3.0.0-devel.0 of Marcos Bash Functions Library.