From edff9ebd1803a386aa3f5764a6cd338f027f375e Mon Sep 17 00:00:00 2001 From: Ninni Pipping Date: Tue, 20 Jun 2023 10:30:02 +0200 Subject: [PATCH] Clarify `String.get_slice` behavior Clarify that the function returns the whole string if there is no instances of the delimiter in the string. --- doc/classes/String.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/classes/String.xml b/doc/classes/String.xml index ac571e20bb2..ca8d1d5255f 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -290,7 +290,7 @@ - Splits the string using a [param delimiter] and returns the substring at index [param slice]. Returns an empty string if the [param slice] does not exist. + Splits the string using a [param delimiter] and returns the substring at index [param slice]. Returns the original string if [param delimiter] does not occur in the string. Returns an empty string if the [param slice] does not exist. This is faster than [method split], if you only need one substring. [b]Example:[/b] [codeblock]