summaryrefslogtreecommitdiff
path: root/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util.ts')
-rw-r--r--util.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.ts b/util.ts
index 84ef8b5a8..d05bea8c0 100644
--- a/util.ts
+++ b/util.ts
@@ -15,3 +15,7 @@ export function copyBytes(dst: Uint8Array, src: Uint8Array, off = 0): number {
dst.set(src, off);
return src.byteLength;
}
+
+export function charCode(s: string): number {
+ return s.charCodeAt(0);
+}