moved string manipulation functions out of the surf plugin (most of them anyway).
Merge branch 'options-xml' of https://github.com/pmaciel/m into options-xml