浏览代码

Improve and fix examples for padBytesRight

toby 8 年之前
父节点
当前提交
0fd2550190
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      src/js/core/Utils.js

+ 8 - 2
src/js/core/Utils.js

@@ -104,11 +104,17 @@ var Utils = {
      * @returns {byteArray}
      * @returns {byteArray}
      *
      *
      * @example
      * @example
-     * // returns "['a', 0, 0, 0]"
+     * // returns ["a", 0, 0, 0]
      * Utils.padBytesRight("a", 4);
      * Utils.padBytesRight("a", 4);
      *
      *
-     * // returns "['a', 1, 1, 1]"
+     * // returns ["a", 1, 1, 1]
      * Utils.padBytesRight("a", 4, 1);
      * Utils.padBytesRight("a", 4, 1);
+     *
+     * // returns ["t", "e", "s", "t", 0, 0, 0, 0]
+     * Utils.padBytesRight("test", 8);
+     *
+     * // returns ["t", "e", "s", "t", 1, 1, 1, 1]
+     * Utils.padBytesRight("test", 8, 1);
      */
      */
     padBytesRight: function(arr, numBytes, padByte) {
     padBytesRight: function(arr, numBytes, padByte) {
         padByte = padByte || 0;
         padByte = padByte || 0;