Loadable extensions are presented in full detail in Writing Extensions for
They provide a way to add functions to
gawk which can call
out to other facilities written in C or C++.
For the purposes of
wc.awk, it’s enough to know that the extension is loaded
@load directive, and the additional function we
will use is called
mbs_length(). This function returns the
number of bytes in a string, not the number of characters.
"mbs" extension comes from the
project. See The
gawkextlib Project for more information.