Explorar o código

[3.x] Clarify `String.get_slice` behavior

Clarify that the function returns the whole string if there is no
instances of the delimiter in the string.

(cherry picked from commit dec7cb55482f83f8a2472c92c8cfe96d1854d6f1)
Ninni Pipping %!s(int64=2) %!d(string=hai) anos
pai
achega
1cc210d1e9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      doc/classes/String.xml

+ 1 - 1
doc/classes/String.xml

@@ -358,7 +358,7 @@
 			<argument index="0" name="delimiter" type="String" />
 			<argument index="0" name="delimiter" type="String" />
 			<argument index="1" name="slice" type="int" />
 			<argument index="1" name="slice" type="int" />
 			<description>
 			<description>
-				Splits a string using a [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist.
+				Splits a string using a [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns the original string if [code]delimiter[/code] does not occur in the string. Returns an empty string if the index doesn't exist.
 				This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index.
 				This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index.
 				Example:
 				Example:
 				[codeblock]
 				[codeblock]