Reputation: 1826
I'm getting a trailing characters error for the 'for loop' in the following lines of code and I've no clue why.
function! s:HashID(str) "{{{
let l:hash_id = 0
for i in split(a:str, '\zs')
l:hash_id += float2nr(pow(2, stridx('abcdefg', i)))
endfor
return l:hash_id
endfunction
What am I goofing up here?
Upvotes: 2
Views: 1641