From 8c18330aa3976aa981bbe4f135960a92b5923fb6 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 7 Dec 2024 21:13:28 +0800 Subject: Initial commit --- util.go | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 util.go (limited to 'util.go') diff --git a/util.go b/util.go new file mode 100644 index 0000000..0037330 --- /dev/null +++ b/util.go @@ -0,0 +1,8 @@ +package main + +func trimInitialSpaces(line string) string { + var i int + for i = 0; i < len(line) && line[i] == ' '; i++ { + } + return line[i:] +} -- cgit v1.2.3