mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
all: replace "NB:" with "Note:" (docs/comments)
This commit is contained in:
parent
f74b65b63f
commit
36ec47cd20
131 changed files with 209 additions and 209 deletions
|
@ -1,14 +1,14 @@
|
|||
module builtin
|
||||
|
||||
// NB: this file will be removed soon
|
||||
// Note: this file will be removed soon
|
||||
|
||||
// byteptr.vbytes() - makes a V []byte structure from a C style memory buffer. NB: the data is reused, NOT copied!
|
||||
// byteptr.vbytes() - makes a V []byte structure from a C style memory buffer. Note: the data is reused, NOT copied!
|
||||
[unsafe]
|
||||
pub fn (data byteptr) vbytes(len int) []byte {
|
||||
return unsafe { voidptr(data).vbytes(len) }
|
||||
}
|
||||
|
||||
// vstring converts a C style string to a V string. NB: the string data is reused, NOT copied.
|
||||
// vstring converts a C style string to a V string. Note: the string data is reused, NOT copied.
|
||||
// strings returned from this function will be normal V strings beside that (i.e. they would be
|
||||
// freed by V's -autofree mechanism, when they are no longer used).
|
||||
[unsafe]
|
||||
|
@ -20,7 +20,7 @@ pub fn (bp byteptr) vstring() string {
|
|||
}
|
||||
|
||||
// vstring_with_len converts a C style string to a V string.
|
||||
// NB: the string data is reused, NOT copied.
|
||||
// Note: the string data is reused, NOT copied.
|
||||
[unsafe]
|
||||
pub fn (bp byteptr) vstring_with_len(len int) string {
|
||||
return string{
|
||||
|
@ -31,7 +31,7 @@ pub fn (bp byteptr) vstring_with_len(len int) string {
|
|||
}
|
||||
|
||||
// vstring converts C char* to V string.
|
||||
// NB: the string data is reused, NOT copied.
|
||||
// Note: the string data is reused, NOT copied.
|
||||
[unsafe]
|
||||
pub fn (cp charptr) vstring() string {
|
||||
return string{
|
||||
|
@ -42,7 +42,7 @@ pub fn (cp charptr) vstring() string {
|
|||
}
|
||||
|
||||
// vstring_with_len converts C char* to V string.
|
||||
// NB: the string data is reused, NOT copied.
|
||||
// Note: the string data is reused, NOT copied.
|
||||
[unsafe]
|
||||
pub fn (cp charptr) vstring_with_len(len int) string {
|
||||
return string{
|
||||
|
@ -53,7 +53,7 @@ pub fn (cp charptr) vstring_with_len(len int) string {
|
|||
}
|
||||
|
||||
// vstring_literal converts a C style string to a V string.
|
||||
// NB: the string data is reused, NOT copied.
|
||||
// Note: the string data is reused, NOT copied.
|
||||
// NB2: unlike vstring, vstring_literal will mark the string
|
||||
// as a literal, so it will not be freed by autofree.
|
||||
// This is suitable for readonly strings, C string literals etc,
|
||||
|
@ -69,7 +69,7 @@ pub fn (bp byteptr) vstring_literal() string {
|
|||
}
|
||||
|
||||
// vstring_with_len converts a C style string to a V string.
|
||||
// NB: the string data is reused, NOT copied.
|
||||
// Note: the string data is reused, NOT copied.
|
||||
[unsafe]
|
||||
pub fn (bp byteptr) vstring_literal_with_len(len int) string {
|
||||
return string{
|
||||
|
@ -81,7 +81,7 @@ pub fn (bp byteptr) vstring_literal_with_len(len int) string {
|
|||
|
||||
// vstring_literal converts C char* to V string.
|
||||
// See also vstring_literal defined on byteptr for more details.
|
||||
// NB: the string data is reused, NOT copied.
|
||||
// Note: the string data is reused, NOT copied.
|
||||
[unsafe]
|
||||
pub fn (cp charptr) vstring_literal() string {
|
||||
return string{
|
||||
|
@ -93,7 +93,7 @@ pub fn (cp charptr) vstring_literal() string {
|
|||
|
||||
// vstring_literal_with_len converts C char* to V string.
|
||||
// See also vstring_literal_with_len defined on byteptr.
|
||||
// NB: the string data is reused, NOT copied.
|
||||
// Note: the string data is reused, NOT copied.
|
||||
[unsafe]
|
||||
pub fn (cp charptr) vstring_literal_with_len(len int) string {
|
||||
return string{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue