(s, maxlen)
| 6910 | } |
| 6911 | |
| 6912 | function truncate(s, maxlen) { |
| 6913 | if (s.length <= maxlen) { |
| 6914 | return { value: s, truncated: false } |
| 6915 | } |
| 6916 | |
| 6917 | s = s.substring(0, maxlen - 4) + " ..." |
| 6918 | return { value: s, truncated: true } |
| 6919 | } |
| 6920 | |
| 6921 | function MaxCharsReachedError() { |
| 6922 | this.message = "Exceeded " + j$.MAX_PRETTY_PRINT_CHARS + " characters while pretty-printing a value" |