From 7c281b256a2685bc7cfd5a8f532631366ba05bd8 Mon Sep 17 00:00:00 2001 From: snakierten96 Date: Wed, 26 Feb 2014 13:27:13 +1100 Subject: [PATCH] Update substr.txt Document the usage of $substr to cast an integer as a string --- source/reference/operator/aggregation/substr.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 +