mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: replace "NB:" with "Note:" (docs/comments)
This commit is contained in:
@ -79,7 +79,7 @@ pub fn (mut b Builder) drain_builder(mut other Builder, other_new_cap int) {
|
||||
}
|
||||
|
||||
// byte_at returns a byte, located at a given index `i`.
|
||||
// NB: it can panic, if there are not enough bytes in the strings builder yet.
|
||||
// Note: it can panic, if there are not enough bytes in the strings builder yet.
|
||||
[inline]
|
||||
pub fn (b &Builder) byte_at(n int) byte {
|
||||
return unsafe { (&[]byte(b))[n] }
|
||||
@ -123,7 +123,7 @@ pub fn (mut b Builder) cut_to(pos int) string {
|
||||
}
|
||||
|
||||
// go_back_to resets the buffer to the given position `pos`
|
||||
// NB: pos should be < than the existing buffer length.
|
||||
// Note: pos should be < than the existing buffer length.
|
||||
pub fn (mut b Builder) go_back_to(pos int) {
|
||||
b.trim(pos)
|
||||
}
|
||||
@ -162,7 +162,7 @@ pub fn (b &Builder) after(n int) string {
|
||||
}
|
||||
|
||||
// str returns a copy of all of the accumulated buffer content.
|
||||
// NB: after a call to b.str(), the builder b should not be
|
||||
// Note: after a call to b.str(), the builder b should not be
|
||||
// used again, you need to call b.free() first, or just leave
|
||||
// it to be freed by -autofree when it goes out of scope.
|
||||
// The returned string *owns* its own separate copy of the
|
||||
|
@ -14,7 +14,7 @@ pub fn repeat(c byte, n int) string {
|
||||
}
|
||||
|
||||
// strings.repeat_string - gives you `n` repetitions of the substring `s`
|
||||
// NB: strings.repeat, that repeats a single byte, is between 2x
|
||||
// Note: strings.repeat, that repeats a single byte, is between 2x
|
||||
// and 24x faster than strings.repeat_string called for a 1 char string.
|
||||
pub fn repeat_string(s string, n int) string {
|
||||
if n <= 0 || s.len == 0 {
|
||||
|
@ -129,7 +129,7 @@ pub fn (ss &TextScanner) peek_back_n(n int) int {
|
||||
|
||||
// current returns the current character code from the input text.
|
||||
// current returns `-1` at the start of the input text.
|
||||
// NB: after `c := ts.next()`, `ts.current()` will also return `c`.
|
||||
// Note: after `c := ts.next()`, `ts.current()` will also return `c`.
|
||||
[direct_array_access; inline]
|
||||
pub fn (mut ss TextScanner) current() int {
|
||||
if ss.pos > 0 {
|
||||
|
Reference in New Issue
Block a user