neovim/neovim — pull request #729 by aktau (2014-05-17 20:04:42+00:00)
Title: [RFC] api/helpers: implement C string to String helper

@tarruda as suggested by @oni-link we could use `xmemdup` there, which is faster since it avoids an extra `strlen`, and saves a whopping byte of memory ;). To save on lines I abstracted it out into a separate function.

Reference: https://github.com/neovim/neovim/pull/727#discussion_r12768748