Skip to content

Commit 37b8ee5

Browse files
committed
Link to dlang tour discussion of auto-decoding.
1 parent a285566 commit 37b8ee5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

std/algorithm/searching.d

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -807,10 +807,10 @@ if (isInputRange!R && !isInfinite!R)
807807
- `needle` is the index into `needles` which matched.
808808
- Both are `-1` if there was no match.
809809
810-
Warning: Due to auto-decoding, the return value of this function may
811-
$(I not) correspond to the array index for strings. To find the index of an
812-
element matching the predicate in a string, use $(REF indexOf, std,string)
813-
instead.
810+
Warning: Due to $(LINK2 https://tour.dlang.org/tour/en/gems/unicode,
811+
auto-decoding), the return value of this function may $(I not) correspond
812+
to the array index for strings. To find the index of an element matching
813+
the predicate in a string, use $(REF indexOf, std,string) instead.
814814
815815
See_Also: $(REF indexOf, std,string)
816816
+/
@@ -1052,10 +1052,10 @@ if (isInputRange!R &&
10521052
- If `startsWith!pred(haystack)` is not `true` for any element in
10531053
`haystack`, then `-1` is returned.
10541054
1055-
Warning: Due to auto-decoding, the return value of this function may
1056-
$(I not) correspond to the array index for strings. To find the index of an
1057-
element matching the predicate in a string, use $(REF indexOf, std,string)
1058-
instead.
1055+
Warning: Due to $(LINK2 https://tour.dlang.org/tour/en/gems/unicode,
1056+
auto-decoding), the return value of this function may $(I not) correspond
1057+
to the array index for strings. To find the index of an element matching
1058+
the predicate in a string, use $(REF indexOf, std,string) instead.
10591059
+/
10601060
ptrdiff_t countUntil(alias pred, R)(R haystack)
10611061
if (isInputRange!R &&

0 commit comments

Comments
 (0)