baiy / Ctool

程序开发常用工具 chrome / edge / firefox / utools / windows / linux / mac
https://ctool.dev
MIT License
1.48k stars 208 forks source link

增加 `Backslash Escape/Unescape` 功能 #204

Closed bytemain closed 1 year ago

bytemain commented 1 year ago

在开发中,有些文本复制出来是带 \n 的,这个时候想把 \n 去掉,有个工具的话就很方便。

Example

Input:

\n\tallow.auto.create.topics = true\n\tauto.commit.interval.ms = 5000\n\tauto.offset.reset = latest\n\tbootstrap.servers = [kafka.service.consul:9092]\n\tcheck.crcs = true\n\tclient.dns.lookup = default\n\t

Output:

    allow.auto.create.topics = true
    auto.commit.interval.ms = 5000
    auto.offset.reset = latest
    bootstrap.servers = [kafka.service.consul:9092]
    check.crcs = true
    client.dns.lookup = default
bytemain commented 1 year ago

https://en.wikipedia.org/wiki/Escape_character

JavaScript uses the \ (backslash) as an escape character for:[1][2]

bytemain commented 1 year ago

可以用这两个库:

baiy commented 1 year ago

@bytemain 收到

可以用这两个库:

bytemain commented 1 year ago

感谢大佬,希望之后可以更新一下 utools 插件带上这个特性