本文整理匯總了TypeScript中vs/editor/common/core/stringBuilder.createStringBuilder函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript createStringBuilder函數的具體用法?TypeScript createStringBuilder怎麽用?TypeScript createStringBuilder使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了createStringBuilder函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: getRandomString
function getRandomString(minLength: number, maxLength: number): string {
let length = getRandomInt(minLength, maxLength);
let t = createStringBuilder(length);
for (let i = 0; i < length; i++) {
t.appendASCII(getRandomInt(CharCode.a, CharCode.z));
}
return t.build();
}
示例2: renderViewLine2
export function renderViewLine2(input: RenderLineInput): RenderLineOutput2 {
let sb = createStringBuilder(10000);
let out = renderViewLine(input, sb);
return new RenderLineOutput2(out.characterMapping, sb.build(), out.containsRTL, out.containsForeignElements);
}