In the function-list, it gives execute() as running an ex command, but it does not seem to be returning a string as I expect.
For example, if I run this on a file that has 'abc' in it somewhere:
:echo execute("%s/abc//gen")
Then it answers: "1 match on 1 line". Then if make the following command:
:echo str2nr("1 match on 1 line")
Then it returns the number 1 on the status line. However, finally, if I run this:
:echo str2nr(execute("%s/abc//gen"))
Then it returns 0 on the status line, not 1 as expected. What is going wrong here?