Просмотр исходного кода

Merge pull request #78464 from AThousandShips/string_slice_doc_3_x

[3.x] Clarify `String.get_slice` behavior
Rémi Verschelde 2 лет назад
Родитель
Сommit
7cfd984e73
1 измененных файлов с 1 добавлено и 1 удалено
  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]