🔄 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)中使用
- 計算結果僅供參考,請以實際應用場景為準