🔄 Text Reverser
📐 工作原理与说明
六种反转:full 全串反转;lines 行序反转;perline 逐行内字符反转;words 按空白切分的词序反转(保留空白);wordsperline 逐行词序反转;chars 仅反转字母数字字符、其余原位;可选去每行首尾空白、大小写反转、换行转空格
Reverse the character or line order of your text for palindrome checks, playful copy and encoding debugging, all done locally.
整文反转olleH dlroW
行序反转第二行变第一行
每行反转行内字符倒序
词序反转World Hello
每行词序反转每行内词倒序
仅字母数字反转保留符号位置
集具俱 xoBloT
dlroW olleH
💡 模式说明
- 整文反转: 将整个文本(含换行)当作字符串反转
- 行序反转: 保留每行内容,仅反转行的顺序
- 每行反转: 保留行序,反转每行内的字符
- 词序反转: 整体按空格分隔后词序反转
- 每行词序反转: 每行内词序反转
- 仅字母数字反转: 仅反转字母数字字符,符号位置不变
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Grapheme cluster reversal | reversal should proceed by grapheme cluster rather than code point | Unicode UAX #29, text segmentation |
| Surrogate pairs | supplementary characters use surrogate pairs that break under code unit reversal | Unicode Standard, UTF-16 encoding |
| Bidi property | right to left text and digits reverse differently under the bidi algorithm | Unicode UAX #9, bidirectional algorithm |
⚠️ 使用说明与注意事项
- 本工具纯前端运行,数据不会上传到服务器
- 建议在主流浏览器(Chrome/Safari/Firefox/Edge)中使用
- 计算结果仅供参考,请以实际应用场景为准