MCPcopy Create free account
hub / github.com/microsoft/vscode-cpptools / sizeOf

Function sizeOf

Extension/src/Utility/Text/characterCodes.ts:201–203  ·  view source on GitHub ↗
(ch: number)

Source from the content-addressed store, hash-verified

199
200/** Characters that are in this range are actually code points that take two characters in UTF-16 */
201export function sizeOf(ch: number): number {
202 return ch >= 0xD800 && ch <= 0xDBFF ? 2 : 1;
203}
204
205function lookupInUnicodeMap(code: number, map: readonly number[]): boolean {
206 // Bail out quickly if it couldn't possibly be in the map.

Callers 1

advanceMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected