1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

add extend

This commit is contained in:
程序员小墨 2022-12-08 23:57:50 +08:00
parent f4723761bf
commit 88dea913c3
5 changed files with 4995 additions and 3 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
get-total.js Normal file
View File

@ -0,0 +1,6 @@
const fs = require('fs');
const path = require('path');
const DataFile = path.join(__dirname, './data-single-word.txt')
let total = fs.readFileSync(DataFile, 'utf8')
console.log(total.length)

View File

@ -9,7 +9,7 @@ let list = input.trim().replace(/[\r\n a-zA-Z0-9-_~!@#$%^&*\(\)<>?:\"\{\},\.\/;'
list = Array.from(new Set(list.split(''))).sort((a, b) => a.localeCompare(b)).join('') list = Array.from(new Set(list.split(''))).sort((a, b) => a.localeCompare(b)).join('')
// console.log(list) // console.log(list)
fs.writeFileSync(path.join(__dirname, './output.txt'), list, 'utf8') fs.writeFileSync(path.join(__dirname, './output.txt'), list, 'utf8')
return // return
for (let word of list) { for (let word of list) {
// 汉字 // 汉字