diff options
| author | Sam Scholten | 2025-12-15 19:35:46 +1000 |
|---|---|---|
| committer | Sam Scholten | 2025-12-15 19:35:57 +1000 |
| commit | 3562d2fd34bb98d29c7cf6e4d4130129a7bb24f2 (patch) | |
| tree | 42b1f0e0a346a1cf087df90e29a100edbd66b3eb /util.go | |
| download | scholfetch-3562d2fd34bb98d29c7cf6e4d4130129a7bb24f2.tar.gz scholfetch-3562d2fd34bb98d29c7cf6e4d4130129a7bb24f2.zip | |
Diffstat (limited to 'util.go')
| -rw-r--r-- | util.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,14 @@ +package main + +import ( + "regexp" + "strings" +) + +func normalizeSpace(s string) string { + return strings.Join(strings.Fields(s), " ") +} + +func stripArxivVersion(id string) string { + return regexp.MustCompile(`v\d+$`).ReplaceAllString(id, "") +} |
