mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
strings: add Builder.cut_to (#10042)
This commit is contained in:
parent
b34b56ee4e
commit
2d2b4f79cc
3 changed files with 23 additions and 20 deletions
|
@ -44,11 +44,6 @@ pub fn (b []byte) clone() []byte {
|
|||
|
||||
// TODO remove this once runes are implemented
|
||||
pub fn (b []byte) bytestr() string {
|
||||
return bytes2string(b)
|
||||
}
|
||||
|
||||
// TODO copy pasted from builder.v
|
||||
fn bytes2string(b []byte) string {
|
||||
unsafe {
|
||||
buf := malloc(b.len + 1)
|
||||
C.memcpy(buf, b.data, b.len)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue