Project

General

Profile

Bug #6680 » rdoc_for_array_and_string_slice_2_v2.patch

stomar (Marcus Stollsteimer), 07/04/2012 09:38 PM

View differences:

string.c (Arbeitskopie)
* Element Reference --- If passed a single +index+, returns a substring of
* one character at that index. If passed a +start+ index and a +length+,
* returns a substring containing +length+ characters starting at the
* +index+. If passed a range, its beginning and end are interpreted as
* offsets delimiting the substring to be returned. In these three cases, if
* an index is negative, it is counted from the end of the string.
* index. If passed a range, its beginning and end are interpreted as
* offsets delimiting the substring to be returned.
* In the latter two cases, an index of +str.size+ identifies the end of the string.
* In all three cases, if an index is negative, it is counted from the end
* of the string.
*
* Returns +nil+ if the initial index falls outside the string or the length
* is negative.
array.c (Arbeitskopie)
* Element Reference --- Returns the element at +index+, or returns a
* subarray starting at the +start+ index and continuing for +length+
* elements, or returns a subarray specified by +range+ of indices.
* In the latter two cases, a start index of +ary.size+ identifies the
* end of the array.
*
* Negative indices count backward from the end of the array (-1 is the last
* element).
......
* Element Assignment --- Sets the element at +index+, or replaces a subarray
* from the +start+ index for +length+ elements, or replaces a subarray
* specified by the +range+ of indices.
* In the latter two cases, a start index of +ary.size+ identifies the
* end of the array.
*
* If indices are greater than the current capacity of the array, the array
* grows automatically. Negative indices will count backward from the end of
(3-3/4)