src/vs/editor/common/languages/supports/richEditBrackets.ts/reverse
	function reverse(str: string): string {
		if (stringBuilder.hasTextDecoder) {
			// create a Uint16Array and then use a TextDecoder to create a string
			const arr = new Uint16Array(str.length);
			let offset = 0;
			for (let i = str.length - 1; i >= 0; i--) {
				arr[offset++] = str.charCodeAt(i);
			}
			return stringBuilder.getPlatformTextDecoder().decode(arr);
		} else {
			const result: string[] = [];
			let resultLen = 0;
			for (let i = str.length - 1; i >= 0; i--) {
				result[resultLen++] = str.charAt(i);
			}
			return result.join('');
		}
	}