We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 54bdf28 + 19d202a commit a27a41fCopy full SHA for a27a41f
go/olc.go
@@ -189,6 +189,13 @@ func CheckFull(code string) error {
189
return nil
190
}
191
192
+func upper(b byte) byte {
193
+ if 'c' <= b && b <= 'x' {
194
+ return b + 'C' - 'c'
195
+ }
196
+ return b
197
+}
198
+
199
// StripCode strips the padding and separator characters from the code.
200
//
201
// The code is truncated to the first 15 digits, as Decode won't use more,
@@ -200,7 +207,7 @@ func StripCode(code string) string {
207
if r == Separator || r == Padding {
208
continue
202
209
203
- result[pos] = byte(r)
210
+ result[pos] = upper(byte(r))
204
211
pos++
205
212
if pos >= maxCodeLen {
206
213
break
0 commit comments