mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os_linux.v
This commit is contained in:
@ -24,12 +24,14 @@ pub fn tos(s byteptr, len int) string {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
pub fn tos_clone(s byteptr) string {
|
||||
if s == 0 {
|
||||
panic('tos: nil string')
|
||||
}
|
||||
return tos2(s).clone()
|
||||
}
|
||||
*/
|
||||
|
||||
// Same as `tos`, but calculates the length. Called by `string(bytes)` casts.
|
||||
// Used only internally.
|
||||
@ -53,6 +55,7 @@ pub fn tos3(s *C.char) string {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
pub fn (a string) clone() string {
|
||||
mut b := string {
|
||||
len: a.len
|
||||
@ -64,3 +67,4 @@ pub fn (a string) clone() string {
|
||||
b[a.len] = `\0`
|
||||
return b
|
||||
}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user