mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
fix InsertSpaceEvery24Chars
This commit is contained in:
@@ -47,12 +47,15 @@ export default {
|
|||||||
this.msg = "";
|
this.msg = "";
|
||||||
},
|
},
|
||||||
|
|
||||||
InsertSpaceEvery24Chars(word) {
|
InsertSpaceEvery24Chars(text) {
|
||||||
let result = "";
|
let result = "";
|
||||||
for (let i = 0; i < word.length; i += 22) {
|
for (let i = 0; i < text.length; i++) {
|
||||||
result += word.substring(i, i + 22) + " ";
|
if (i > 0 && i % 24 === 0) {
|
||||||
|
result += " ";
|
||||||
|
}
|
||||||
|
result += text[i];
|
||||||
}
|
}
|
||||||
return result.trim();
|
return result;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user