# HG changeset patch # User Yaroslav Zhuravlev # Date 1612269448 0 # Node ID 0085d9f7dc3ffd46a8981c3456a0ae60c532c0b0 # Parent d2d4549363ecfb2c42bb6ba96ded915cf9179a40 Minor corrections in njs reference. diff --git a/xml/en/docs/njs/reference.xml b/xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml +++ b/xml/en/docs/njs/reference.xml @@ -9,7 +9,7 @@
+ rev="60">
@@ -1118,9 +1118,8 @@ if encoding is the name of a supported c buffer[index] -The index operator index -can be used to get and set the octet at position index in -buffer. +The index operator that can be used to get and set the octet +at position index in buffer. The values refer to individual bytes, so the legal value range is between 0 and 255 (decimal). @@ -1144,21 +1143,21 @@ underlying ArrayBuffersourceStart[, sourceEnd]]]]) -Compares buffer with target and returns a number +Compares buffer with target and returns a number indicating whether buffer comes before, after, or is the same -as target in sort order. +as target in sort order. Comparison is based on the actual sequence of bytes in each Buffer. -The targetStart is an integer specifying the offset -within target at which to begin comparison, +The targetStart is an integer specifying +the offset within target at which to begin comparison, by default is 0. -The targetEnd is an integer specifying the offset -within target at which to end comparison, +The targetEnd is an integer specifying +the offset within target at which to end comparison, by default is target.length. -The sourceStart is an integer specifying the offset -within buffer at which to begin comparison, +The sourceStart is an integer specifying +the offset within buffer at which to begin comparison, by default is 0. -The sourceEnd is an integer specifying the offset -within buffer at which to end comparison (not inclusive), +The sourceEnd is an integer specifying +the offset within buffer at which to end comparison (not inclusive), by default is buf.length. @@ -1167,20 +1166,20 @@ by default is buf.lengthsourceStart[, sourceEnd]]]) -Copies data from a region of buffer to a region in target, +Copies data from a region of buffer to a region in target, even if the target memory region overlaps with buffer. The target parameter is a Buffer or Uint8Array to copy into. -The targetStart is an integer specifying the offset -within target at which to begin writing, +The targetStart is an integer specifying +the offset within target at which to begin writing, by default is 0. -The sourceStart is an integer specifying the offset -within buffer from which to begin copying, +The sourceStart is an integer specifying +the offset within buffer from which to begin copying, by default is 0. -The sourceEnd is an integer specifying the offset -within buffer at which to stop copying (not inclusive) +The sourceEnd is an integer specifying +the offset within buffer at which to stop copying (not inclusive) by default is buf.length. @@ -1412,7 +1411,7 @@ implicitly calls this function when stri end]]]) Decodes buf to a string -according to the specified character encoding. +according to the specified character encoding which can be utf8, hex, base64,