mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
utf8bytelength: count UTF8 string bytelength
[Builtin name changed, and it only works on string inputs. -Nico]
This commit is contained in:
committed by
Nicolas Williams
parent
63dd033da7
commit
83e8ec587f
@@ -662,6 +662,18 @@ sections:
|
||||
input: '[[1,2], "string", {"a":2}, null]'
|
||||
output: [2, 6, 1, 0]
|
||||
|
||||
|
||||
- title: "`utf8bytelength`"
|
||||
body: |
|
||||
|
||||
The builtin function `utf8bytelength` outputs the number of
|
||||
bytes used to encode a string in UTF-8.
|
||||
|
||||
examples:
|
||||
- program: 'utf8bytelength'
|
||||
input: '"\u03bc"'
|
||||
output: [2]
|
||||
|
||||
- title: "`keys`, `keys_unsorted`"
|
||||
body: |
|
||||
|
||||
|
Reference in New Issue
Block a user