diff --git a/source/reference/operator/aggregation/substr.txt b/source/reference/operator/aggregation/substr.txt index c68be0b8def..b42fd5f05e9 100644 --- a/source/reference/operator/aggregation/substr.txt +++ b/source/reference/operator/aggregation/substr.txt @@ -6,7 +6,7 @@ $substr (aggregation) .. expression:: $substr - :expression:`$substr` takes a string and two numbers. The first + :expression:`$substr` takes a string or integer and two numbers. The first number represents the number of bytes in the string to skip, and the second number specifies the number of bytes to return from the string. @@ -16,3 +16,9 @@ $substr (aggregation) :expression:`$substr` is not encoding aware and if used improperly may produce a result string containing an invalid UTF-8 character sequence. + + + If the first argument to :expression:`$substr` is an integer, then the + result is cast as a string from the starting skipped bytes to the number + of bytes returned +