2025-06-21 19:31:51 +08:00

8 lines
445 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { splitContent } from '../routes/mentions/mention.ts';
const content = `这是一个测试内容长度超过300个字符。34`.repeat(43); // 模拟一个超过300个字符的内容
const maxLength = 270; // 设置分割长度为270个字符
const parts = splitContent(content, maxLength);
console.log('分割后的内容:', parts);
// 输出分割后的内容
console.log('分割后的内容长度:', parts.map(part => part.length));