File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 523
523
c1 = GET_ANY_CHAR (ser , index );
524
524
if (uncase && c1 < UNICODE_CASES ) c1 = LO_CASE (c1 );
525
525
526
- if (c1 == c2 ) return index ;
527
-
526
+ if (c1 == c2 ) {
527
+ if GET_FLAG (flags , ARG_FIND_TAIL - 1 ) index ++ ;
528
+ return index ;
529
+ }
528
530
if GET_FLAG (flags , ARG_FIND_MATCH - 1 ) break ;
529
531
}
530
532
Original file line number Diff line number Diff line change @@ -67,6 +67,17 @@ Rebol [
67
67
; --assert none? find/part "abcd" "bc" 2
68
68
; --assert none? find/part/any "abcd" "*c" 2
69
69
70
+ --test-- "FIND char in string"
71
+ str: "a,b"
72
+ --assert ",b" = find str #","
73
+ --assert ",b" = find/reverse tail str #","
74
+ --assert "b" = find/tail str #","
75
+ --assert "b" = find/tail/reverse tail str #","
76
+ --assert "b" = find str #"b"
77
+ --assert "b" = find str #"B"
78
+ --assert "b" = find/case str #"b"
79
+ --assert none? find/case str #"B"
80
+
70
81
--test-- https://github.com/rebol/rebol-issues/issues/66
71
82
--assert none? find/skip [1 2 3 4 5 6 ] 2 3
72
83
You can’t perform that action at this time.
0 commit comments