1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

Clarify documentation of STRING * INTEGER

This commit is contained in:
pkoppstein
2015-08-04 21:40:16 -04:00
parent b5edbf7ffa
commit d66fbd218b

View File

@ -612,13 +612,14 @@ sections:
- title: Multiplication, division, modulo - `*`, `/`, and `%`
body: |
These operators only work on numbers, and do the expected.
These infix operators behave as expected when given two numbers.
Division by zero raises an error. `x % y` computes x modulo y.
Multiplying a string by a number produces the concatenation of
that string that many times.
that string that many times. `"x" * 0` produces **null**.
Dividing a string by another splits the first using the second
as separators. Division by zero raises an error.
as separators.
Multiplying two objects will merge them recursively: this works
like addition but if both objects contain a value for the