src/vs/editor/contrib/indentation/browser/indentUtils.ts/generateIndent
export function generateIndent(spacesCnt: number, tabSize: number, insertSpaces: boolean) {
	spacesCnt = spacesCnt < 0 ? 0 : spacesCnt;

	let result = '';
	if (!insertSpaces) {
		let tabsCnt = Math.floor(spacesCnt / tabSize);
		spacesCnt = spacesCnt % tabSize;
		for (let i = 0; i < tabsCnt; i++) {
			result += '\t';
		}
	}

	for (let i = 0; i < spacesCnt; i++) {
		result += ' ';
	}

	return result;
}