lib/standard/text: Added methods for bytes to char position translation