提交 8547bd3b 编写于 作者: B baiy 提交者: ninecents

文本处理增强

上级 455d512c
......@@ -72,48 +72,3 @@ npm run build -adapter=[chrome|edge|utools|firefox|web]
|html编码|-|√|
|原码/反码/补码|`生成`|√|
|ARM/HEX|`互转`|×|
## 第三方开源库
项目诞生离不开这些优秀的开源程序
- [code-formatter](https://www.npmjs.com/package/code-formatter)
- [prettier](https://github.com/prettier/prettier)
- [crypto-js](https://www.npmjs.com/package/crypto-js)
- [ipinyinjs](https://www.npmjs.com/package/ipinyinjs)
- [is-url](https://www.npmjs.com/package/is-url)
- [iview](https://www.npmjs.com/package/iview)
- [js-base64](https://www.npmjs.com/package/js-base64)
- [lscache](https://www.npmjs.com/package/lscache)
- [php-array-reader](https://www.npmjs.com/package/php-array-reader)
- [phparr](https://www.npmjs.com/package/phparr)
- [qrcode](https://www.npmjs.com/package/qrcode)
- [qrcode-parser](https://www.npmjs.com/package/qrcode-parser)
- [radix.js](https://www.npmjs.com/package/radix.js)
- [serialize-php](https://www.npmjs.com/package/serialize-php)
- [diff](https://www.npmjs.com/package/diff)
- [vue](https://www.npmjs.com/package/vue)
- [vue-router](https://www.npmjs.com/package/vue-router)
- [taobao](http://ip.taobao.com/)
- [layui](https://github.com/sentsin/layui/)
- [jquery](https://github.com/jquery/jquery)
- [js-base64](https://github.com/dankogai/js-base64)
- [jquery.format](https://github.com/zachofalltrades/jquery.format)
- [pinyinjs](https://github.com/sxei/pinyinjs)
- [jsqrcode-production](https://github.com/aray894/jsqrcode-production)
- [qrcodejs](https://github.com/davidshimjs/qrcodejs)
- [pconline](http://whois.pconline.com.cn/)
- [moment](https://momentjs.com/)
- [vue-codemirror](https://www.npmjs.com/package/vue-codemirror)
- [sm-crypto](https://github.com/JuneAndGreen/sm-crypto)
- [camelcaseplugin](https://github.com/netnexus/camelcaseplugin)
- [jwt-decode](https://www.npmjs.com/package/jwt-decode)
- [jian_fan](https://www.npmjs.com/package/jian_fan)
- [axios](https://www.npmjs.com/package/axios)
- [monaco-editor](https://www.npmjs.com/package/monaco-editor)
- [js-htmlencode](https://www.npmjs.com/package/js-htmlencode)
- [jsrsasign](https://www.npmjs.com/package/jsrsasign)
- [vue-color](https://github.com/xiaokaike/vue-color.git)
- [jsbarcode](https://github.com/lindell/JsBarcode.git)
> 当然项目中还使用很多不知道姓名的大神的代码, 在这里就不一一感谢
{
"name": "c-tool",
"version": "1.9.5",
"version": "1.10.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -305,9 +305,9 @@
}
},
"@babel/parser": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.7.tgz",
"integrity": "sha512-sR4eaSrnM7BV7QPzGfEX5paG/6wrZM3I0HDzfIAK06ESvo9oy3xBuVBxE3MbQaKNhvg8g/ixjMWo2CGpzpHsDA=="
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.0.tgz",
"integrity": "sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw=="
},
"@babel/plugin-proposal-async-generator-functions": {
"version": "7.13.15",
......@@ -1938,17 +1938,17 @@
}
},
"@typescript-eslint/types": {
"version": "5.8.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.8.1.tgz",
"integrity": "sha512-L/FlWCCgnjKOLefdok90/pqInkomLnAcF9UAzNr+DSqMC3IffzumHTQTrINXhP1gVp9zlHiYYjvozVZDPleLcA=="
"version": "5.10.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.2.tgz",
"integrity": "sha512-Qfp0qk/5j2Rz3p3/WhWgu4S1JtMcPgFLnmAKAW061uXxKSa7VWKZsDXVaMXh2N60CX9h6YLaBoy9PJAfCOjk3w=="
},
"@typescript-eslint/typescript-estree": {
"version": "5.8.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.8.1.tgz",
"integrity": "sha512-26lQ8l8tTbG7ri7xEcCFT9ijU5Fk+sx/KRRyyzCv7MQ+rZZlqiDPtMKWLC8P7o+dtCnby4c+OlxuX1tp8WfafQ==",
"version": "5.10.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.2.tgz",
"integrity": "sha512-WHHw6a9vvZls6JkTgGljwCsMkv8wu8XU8WaYKeYhxhWXH/atZeiMW6uDFPLZOvzNOGmuSMvHtZKd6AuC8PrwKQ==",
"requires": {
"@typescript-eslint/types": "5.8.1",
"@typescript-eslint/visitor-keys": "5.8.1",
"@typescript-eslint/types": "5.10.2",
"@typescript-eslint/visitor-keys": "5.10.2",
"debug": "^4.3.2",
"globby": "^11.0.4",
"is-glob": "^4.0.3",
......@@ -1991,9 +1991,9 @@
}
},
"fast-glob": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz",
"integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==",
"version": "3.2.11",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
"integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==",
"requires": {
"@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3",
......@@ -2019,15 +2019,15 @@
}
},
"globby": {
"version": "11.0.4",
"resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz",
"integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==",
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
"integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
"requires": {
"array-union": "^2.1.0",
"dir-glob": "^3.0.1",
"fast-glob": "^3.1.1",
"ignore": "^5.1.4",
"merge2": "^1.3.0",
"fast-glob": "^3.2.9",
"ignore": "^5.2.0",
"merge2": "^1.4.1",
"slash": "^3.0.0"
}
},
......@@ -2100,18 +2100,18 @@
}
},
"@typescript-eslint/visitor-keys": {
"version": "5.8.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.8.1.tgz",
"integrity": "sha512-SWgiWIwocK6NralrJarPZlWdr0hZnj5GXHIgfdm8hNkyKvpeQuFyLP6YjSIe9kf3YBIfU6OHSZLYkQ+smZwtNg==",
"version": "5.10.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz",
"integrity": "sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q==",
"requires": {
"@typescript-eslint/types": "5.8.1",
"@typescript-eslint/types": "5.10.2",
"eslint-visitor-keys": "^3.0.0"
},
"dependencies": {
"eslint-visitor-keys": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz",
"integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA=="
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz",
"integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ=="
}
}
},
......@@ -4113,6 +4113,11 @@
"integrity": "sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==",
"dev": true
},
"chinese-simple2traditional": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/chinese-simple2traditional/-/chinese-simple2traditional-1.0.1.tgz",
"integrity": "sha512-4FlITo+uv88lLU1LirTctZCG8u/vgo/MYtDzLQYN7iibaprY1g2xwdN7AirwrJv55Z6ODlDBWpQGpvFAIaGVhw=="
},
"chokidar": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
......@@ -4462,9 +4467,9 @@
"integrity": "sha512-472wqY+x6uc/pgV/+6bGnKvqvoHuPjb0O6pDNAfYKkFnAOqocTrro1mni69PZPMXFuE23ZSKdi9/37+uC0jI1Q=="
},
"codemirror": {
"version": "5.65.0",
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.0.tgz",
"integrity": "sha512-gWEnHKEcz1Hyz7fsQWpK7P0sPI2/kSkRX2tc7DFA6TmZuDN75x/1ejnH/Pn8adYKrLEA1V2ww6L00GudHZbSKw=="
"version": "5.65.1",
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.1.tgz",
"integrity": "sha512-s6aac+DD+4O2u1aBmdxhB7yz2XU7tG3snOyQ05Kxifahz7hoxnfxIRHxiCSEv3TUC38dIVH8G+lZH9UWSfGQxA=="
},
"codemirror-graphql": {
"version": "1.2.11",
......@@ -4921,9 +4926,9 @@
}
},
"cronstrue": {
"version": "1.122.0",
"resolved": "https://registry.npmjs.org/cronstrue/-/cronstrue-1.122.0.tgz",
"integrity": "sha512-PFuhZd+iPQQ0AWTXIEYX+t3nFGzBrWxmTWUKJOrsGRewaBSLKZ4I1f8s2kryU75nNxgyugZgiGh2OJsCTA/XlA=="
"version": "1.123.0",
"resolved": "https://registry.npmjs.org/cronstrue/-/cronstrue-1.123.0.tgz",
"integrity": "sha512-hVu9yNYRYr+jj5KET1p7FaBxFwtCHM1ByffP9lZ6yJ6p53u4VEmzH8117v9PUydxWNzc8Eq+sCZEzsKcB3ckiA=="
},
"cross-spawn": {
"version": "6.0.5",
......@@ -5372,9 +5377,9 @@
"dev": true
},
"darkreader": {
"version": "4.9.43",
"resolved": "https://registry.npmjs.org/darkreader/-/darkreader-4.9.43.tgz",
"integrity": "sha512-L6TryKvQiwLcR6YDggkITcPRh9OZeobYkUXHowJOzrV17gT6e0weldbaIJTwdPCoI9tdehTuyyXC8b76/wXhPQ=="
"version": "4.9.44",
"resolved": "https://registry.npmjs.org/darkreader/-/darkreader-4.9.44.tgz",
"integrity": "sha512-Mrt5s5eMaFC24Tfi2nNsXpYIfzWK/RUzJxgk0Ysqokvk9lBCn/pkUTyQGYeQbU/U3aKZEYXXqsxZjNfiLoA6QQ=="
},
"dashdash": {
"version": "1.14.1",
......@@ -8274,11 +8279,6 @@
"integrity": "sha1-FC0RHzpuPa6PSpr9d9RYVbWpzOM=",
"dev": true
},
"jian_fan": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/jian_fan/-/jian_fan-1.0.3.tgz",
"integrity": "sha512-b7Dr2hckX8zViAcEMBMQ/SPtqmfmqQ9Za6W9KD05rcZpb52E2PzxPUwTn0H2TMDv4gaqfa5tUrGNLci9dcnLxw=="
},
"jimp": {
"version": "0.16.1",
"resolved": "https://registry.npmjs.org/jimp/-/jimp-0.16.1.tgz",
......@@ -9360,9 +9360,9 @@
"optional": true
},
"nanoid": {
"version": "3.1.30",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.30.tgz",
"integrity": "sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ=="
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz",
"integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA=="
},
"nanomatch": {
"version": "1.2.13",
......@@ -10373,13 +10373,13 @@
"dev": true
},
"postcss": {
"version": "8.4.5",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz",
"integrity": "sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==",
"version": "8.4.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.6.tgz",
"integrity": "sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA==",
"requires": {
"nanoid": "^3.1.30",
"nanoid": "^3.2.0",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.1"
"source-map-js": "^1.0.2"
}
},
"postcss-calc": {
......@@ -11596,9 +11596,9 @@
}
},
"postcss-scss": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.2.tgz",
"integrity": "sha512-xfdkU128CkKKKVAwkyt0M8OdnelJ3MRcIRAPPQkRpoPeuzWY3RIeg7piRCpZ79MK7Q16diLXMMAD9dN5mauPlQ=="
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.3.tgz",
"integrity": "sha512-j4KxzWovfdHsyxwl1BxkUal/O4uirvHgdzMKS1aWJBAV0qh2qj5qAZqpeBfVUYGWv+4iK9Az7SPyZ4fyNju1uA=="
},
"postcss-selector-parser": {
"version": "6.0.5",
......@@ -13093,9 +13093,9 @@
"dev": true
},
"source-map-js": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.1.tgz",
"integrity": "sha512-4+TN2b3tqOCd/kaGRJ/sTYA0tR0mdXx26ipdolxcwtJVqEnqNYvlCAt1q3ypy4QMlYus+Zh34RNtYLoq2oQ4IA=="
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
},
"source-map-resolve": {
"version": "0.5.3",
......@@ -14166,9 +14166,9 @@
"dev": true
},
"typescript": {
"version": "4.5.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz",
"integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg=="
"version": "4.5.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz",
"integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA=="
},
"uglify-js": {
"version": "3.14.3",
......@@ -14632,9 +14632,9 @@
"dev": true
},
"vue-i18n": {
"version": "8.26.8",
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.26.8.tgz",
"integrity": "sha512-BN2OXolO15AKS95yNF8oOtARibaO6RxyKkAYNV4XpOmL7S4eVZYMIDtyvDv+XGZaiUmBJSH9mdNqzexvGMnK2A=="
"version": "8.27.0",
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.27.0.tgz",
"integrity": "sha512-SX35iJHL5PJ4Gfh0Mo/q0shyHiI2V6Zkh51c+k8E9O1RKv5BQyYrCxRzpvPrsIOJEnLaeiovet3dsUB0e/kDzw=="
},
"vue-loader": {
"version": "15.9.6",
......@@ -15382,9 +15382,9 @@
}
},
"xml-formatter": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/xml-formatter/-/xml-formatter-2.6.0.tgz",
"integrity": "sha512-+bQeoiE5W3CJdDCHTlveYSWFfQWnYB3uHGeRJ6LlEsL5kT++mWy9iN1cMeEDfBbgOnXO2DNUbmQ6elkR/mCcjg==",
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/xml-formatter/-/xml-formatter-2.6.1.tgz",
"integrity": "sha512-dOiGwoqm8y22QdTNI7A+N03tyVfBlQ0/oehAzxIZtwnFAHGeSlrfjF73YQvzSsa/Kt6+YZasKsrdu6OIpuBggw==",
"requires": {
"xml-parser-xo": "^3.2.0"
}
......
{
"name": "c-tool",
"version": "1.10.1",
"version": "1.10.2",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --port 8081",
......@@ -9,30 +9,30 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@babel/parser": "^7.16.7",
"@babel/parser": "^7.17.0",
"@prettier/plugin-php": "^0.17.6",
"@typescript-eslint/typescript-estree": "^5.8.1",
"@typescript-eslint/typescript-estree": "^5.10.2",
"angular-html-parser": "^1.8.0",
"axios": "^0.21.4",
"babel-runtime": "^6.26.0",
"bignumber.js": "^9.0.2",
"chinese-simple2traditional": "^1.0.1",
"code-formatter": "0.0.1",
"codemirror": "^5.65.0",
"codemirror": "^5.65.1",
"codemirror-graphql": "^1.2.11",
"cosmiconfig": "^7.0.1",
"cron-parser": "^2.16.3",
"cronstrue": "^1.122.0",
"cronstrue": "^1.123.0",
"crypto-js": "^3.3.0",
"csv-parse": "^5.0.4",
"csv-stringify": "^6.0.5",
"darkreader": "^4.9.43",
"darkreader": "^4.9.44",
"diff-match-patch": "^1.0.5",
"file": "^0.2.2",
"file-type": "^16.5.3",
"graphql": "15.7.2",
"hexy": "^0.3.4",
"ipinyinjs": "^1.0.0",
"jian_fan": "^1.0.3",
"jimp": "^0.16.1",
"js-base64": "^3.7.2",
"js-htmlencode": "^0.3.0",
......@@ -49,9 +49,9 @@
"moment": "^2.29.1",
"php-array-reader": "^1.3.2",
"phparr": "^0.2.0",
"postcss": "^8.4.5",
"postcss": "^8.4.6",
"postcss-less": "^5.0.0",
"postcss-scss": "^4.0.2",
"postcss-scss": "^4.0.3",
"prettier": "^2.5.1",
"prettier-plugin-sql": "^0.3.0",
"properties-to-json": "^0.1.7",
......@@ -61,16 +61,16 @@
"serialize-php": "^1.1.2",
"sm-crypto": "^0.3.7",
"system": "^2.0.1",
"typescript": "^4.5.4",
"typescript": "^4.5.5",
"uglify-js": "3.14.3",
"uuid": "^8.3.2",
"view-design": "^4.7.0",
"vue": "^2.6.14",
"vue-i18n": "^8.26.8",
"vue-i18n": "^8.27.0",
"vue-router": "^3.5.3",
"vuedraggable": "^2.24.3",
"x2js": "github:abdolence/x2js",
"xml-formatter": "^2.6.0"
"xml-formatter": "^2.6.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.12.1",
......
......@@ -26,10 +26,12 @@
"filter": "Filter",
"filter_trim": "(trim) Removes whitespace from both ends of a string",
"filter_blank_line": "Filter blank line",
"filter_all_br": "Filter newlines",
"stat": "Stat",
"stat_explain": "Explain",
"replace_search": "Search",
"replace_replace": "Replace",
"replace_regular": "Regular",
"replace_explain": "You can enter multiple lines, batch replace by line",
"cancel": "Cancel",
"submit": "Submit",
......
......@@ -26,10 +26,12 @@
"filter": "过滤",
"filter_trim": "过滤行首尾不可见字符(trim)",
"filter_blank_line": "过滤多余空行",
"filter_all_br": "过滤换行符",
"stat": "统计",
"stat_explain": "统计说明",
"replace_search": "查找",
"replace_replace": "替换",
"replace_regular": "正则",
"replace_explain": "可输入多行, 按行进行批量替换",
"cancel": "取消",
"submit": "提交",
......
import language from 'jian_fan'
import { simpleToTradition, traditionToSimple } from "chinese-simple2traditional";
import _ from 'lodash'
......@@ -68,9 +68,9 @@ class TextHandle {
// 简繁转换
zhTran(type = "simplified") {
if (type === "simplified") {
return language.simplified(this.text)
return simpleToTradition(this.text)
}
return language.traditional(this.text)
return traditionToSimple(this.text)
}
// 替换
......@@ -84,6 +84,15 @@ class TextHandle {
return text;
}
// 替换
regularReplace(search, replace) {
let text = this.text;
if (search){
text = text.replace(new RegExp(search, 'g'), replace);
}
return text;
}
// 移除重复行
lineRemoveRepeat() {
return _.uniq(this.text.split("\n")).join("\n")
......@@ -116,6 +125,11 @@ class TextHandle {
}).join("\n")
}
// 过滤所有换行符
filterAllBr() {
return this.text.replace(/\r?\n|\r/g, " ")
}
// 标点替换
replacePunctuation(type = "zh") {
const zh = ["", "", "", "", "", "", "", "", "", "", "……", "", "", "", "", "", ""]
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册