Split text into chunks by character count

Cut a long text into chunks of a maximum length without breaking words, sentences or emoji.