aboutsummaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'util.go')
-rw-r--r--util.go8
1 files changed, 8 insertions, 0 deletions
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:]
+}