HomeWrite.as

fixes potential issue with multi-byte chars

Description

fixes potential issue with multi-byte chars

this moves string trimming into it's own helper which accounts for the
possibility of multi-byte runes.

includes tests for ascii and utf-8 language strings

Details