How to format plaintext like a book/magazine with PHP?
问题 This question was migrated from Super User because it can be answered on Stack Overflow. Migrated 9 days ago . I have: This is a test string. Cool, huh? I want: This is a te- st string. C- ool, huh? That is, each line is exactly 13 chars, according to the English rules for this . That is, I'm not sure if "test" can be broken up like "te-st", or that "Cool" can be broken up to "C-ool", but that's the "style" I'm trying to achieve. I've made about a thousand search queries. I find nothing