Skip to content

Commit

Permalink
attempt to appease vint
Browse files Browse the repository at this point in the history
  • Loading branch information
glennj committed Nov 8, 2024
1 parent 3f92419 commit 569fd86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exercises/practice/grains/.meta/example.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" add two strings as numbers from right to left, as if by hand
function! StringAdd(a, b) abort
" zero-left-pad so the numbers are the same length
let len = [a:a->strlen(), a:b->strlen()]->max()
let len = max([strlen(a:a), strlen(a:b)])
let a = printf('%0*s', len, a:a)
let b = printf('%0*s', len, a:b)
let result = ""
Expand Down

0 comments on commit 569fd86

Please sign in to comment.