diff --git a/vlib/builtin/string.v b/vlib/builtin/string.v index 53f9c87f08..b3476c4fa8 100644 --- a/vlib/builtin/string.v +++ b/vlib/builtin/string.v @@ -3052,3 +3052,16 @@ pub fn (mut ri RunesIterator) next() ?rune { } return rune(impl_utf8_to_utf32(start, len)) } + +// ctovstring_impl is a temporary API, to enable clean CI runs for https://github.com/vlang/v/pull/25264 . +// It will be deleted after the migration to the new `builtin` naming scheme is finished. +@[export: 'builtin__ctovstring'] +pub fn ctovstring_impl(s &u8) string { + unsafe { + len := C.strlen(voidptr(s)) + return string{ + str: memdup(voidptr(s), isize(len)) + len: len + } + } +}