1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: fix compilation and formatting of sqlite example in docs.md

This commit is contained in:
Delyan Angelov
2021-04-05 08:02:37 +03:00
parent 92fa9bbea9
commit 34aa67b1e8
2 changed files with 11 additions and 11 deletions

View File

@ -270,8 +270,8 @@ pub fn (s string) cstr() byteptr {
*/
// cstring_to_vstring creates a copy of cstr and turns it into a v string.
[unsafe]
pub fn cstring_to_vstring(cstr &byte) string {
return unsafe { tos_clone(cstr) }
pub fn cstring_to_vstring(cstr &char) string {
return unsafe { tos_clone(&byte(cstr)) }
}
// replace_once replaces the first occurence of `rep` with the string passed in `with`.