From 8849229e1d7d07ff87d77a2583f56e9a88847960 Mon Sep 17 00:00:00 2001 From: John Whish Date: Sun, 28 Apr 2024 21:10:39 +0100 Subject: [PATCH] Update right.json right now supports negative counts --- data/en/right.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/data/en/right.json b/data/en/right.json index 320ca5fdd..871a0e749 100644 --- a/data/en/right.json +++ b/data/en/right.json @@ -7,7 +7,7 @@ "description":" Gets a specified number of characters from a string,\n beginning at the right.", "params": [ {"name":"String","description":"","required":true,"default":"","type":"string","values":[]}, - {"name":"count","description":"A positive integer or a variable that contains one.\n Number of characters to return.","required":true,"default":"","type":"numeric","values":[]} + {"name":"count","description":"An integer or a variable that contains one.\n Number of characters to return.","required":true,"default":"","type":"numeric","values":[]} ], "engines": { "coldfusion": {"minimum_version":"", "notes":"", "docs":"https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-m-r/right.html"}, @@ -24,6 +24,13 @@ "result": "lazy dog", "runnable":true }, + { + "title": "Using right() with a negative count on a string", + "description": "In this example we'll use a negative count right() to return part of a string.", + "code": "writeOutput( right( 'The quick brown fox jumped over the lazy dog', -32 ) );", + "result": "the lazy dog", + "runnable":true + }, { "title": "Using right() in a function", "description": "In this example we'll use right() in a function to help us to capitalize the last letter in a string.",