🏷️ Prefix & Suffix Adder

📐 工作原理與說明
逐行拼接 = 編號字首 + 自定義字首 + 行內容 + 自定義字尾;編號格式 N. / N) / [N] / {N};倒序編號 = 起始數 + 有效行數 − 1 − 當前序號;補零寬度 = (起始數 + 行數 − 1) 的十進位制位數;可跳空行、去每行首尾空白

Add a fixed prefix or suffix (such as numbering or symbols) to every line, with regex and separator support for batch list formatting.

設定

字首與字尾相互獨立,可只填字首、只填字尾,或兩者都留空(僅做去空格 / 跳空行 / 加序號處理)。

📋 結果

請輸入文本...

📚 深度解析:加前後綴

💡 常見使用場景

  • 批次加引號/括號:給每行內容包上單引號或圓括號,快速拼 SQL IN 列表或陣列。
  • 生成 SQL/程式碼列表:把名字列表加『'』與逗號,直接貼進查詢。
  • 標註與包裝:給每項加統一字首(如「TODO:」)或字尾(如「.com」)。
拼 SQL IN 列表
貼上「a/b/c」每行一個,加字首「'」字尾「',」得「'a',『b',『c',」,最後一項去掉尾逗號即得 ('a','b','c'),省去手敲。

❓ 常見問題(FAQ)

尾逗號怎麼處理?
可在選項去掉末行字尾,或用「末行不加」模式,避免 SQL 語法錯誤;也可生成後手動刪最後一個逗號。
內容含引號會衝突嗎?
會。若原文本已有單引號,再包單引號會破壞字串;此時改用雙引號或轉義,或選無衝突的分隔。

Formula & Standard References

Item Formula / Note Source / Standard
Batch rule per-line prefix and suffix addition needs an explicit rule for blank lines IEEE 1003.1, POSIX text files
Escaping need inserted text must be escaped for the target syntax when used in code or markup ECMA-262, string literals
Encoding impact multi-byte affixes make byte counts differ from character counts Unicode Standard, encoding forms
⚠️ 使用說明與注意事項