On 9/19/07, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:

> let x='grĂ¼n'
> echo "strlen(x)=".strlen(x)
>
> Thus, strlen() returns 5, not 4 as one might (sometimes) expect.

Here's what I have in one my base library:

function now#mbc#len(str)
  return strlen(substitute(a:str, '.', 'c', 'g'))
endfunction

Which is incredibly much better than your solution ;-).

  nikolai

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui