Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim: str2float for integers

Tags:

vim

vim users, is there a string to integer converter like str2float. I can very well use str2float to do it and later on use a regex to deal with the floating point zeros but life would be easy with something like str2int.

like image 752
I J Avatar asked Jul 24 '26 14:07

I J


1 Answers

It's called str2nr(expr, [base]). And it's listed directly below str2float in help file.

like image 187
Cat Plus Plus Avatar answered Jul 26 '26 23:07

Cat Plus Plus