Skip to content

Commit 676e8e5

Browse files
killerswanbrson
authored andcommitted
---
yaml --- r: 7993 b: refs/heads/snap-stage3 c: fc9169f h: refs/heads/master i: 7991: 50cc30d v: v3
1 parent 850c27d commit 676e8e5

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8f367ebfeb4f0b897b386f5c74c4f329fb8cbd54
4+
refs/heads/snap-stage3: fc9169f09c8999040bc2bdb313dd44fbb70472f8
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/libcore/str.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,8 @@ Function: index
841841
842842
Returns the index of the first matching byte. Returns -1 if
843843
no match is found.
844+
845+
FIXME: UTF-8
844846
*/
845847
fn index(s: str, c: u8) -> int {
846848
let i: int = 0;
@@ -853,6 +855,8 @@ Function: rindex
853855
854856
Returns the index of the last matching byte. Returns -1
855857
if no match is found.
858+
859+
FIXME: UTF-8
856860
*/
857861
fn rindex(s: str, c: u8) -> int {
858862
let n: int = byte_len(s) as int;
@@ -874,6 +878,8 @@ needle - The string to look for
874878
Returns:
875879
876880
The index of the first occurance of `needle`, or -1 if not found.
881+
882+
FIXME: UTF-8?
877883
*/
878884
fn find(haystack: str, needle: str) -> int {
879885
let haystack_len: int = byte_len(haystack) as int;
@@ -1589,9 +1595,9 @@ mod tests {
15891595

15901596
#[test]
15911597
fn test_unsafe_slice() unsafe {
1592-
assert (eq("ab", slice("abc", 0u, 2u)));
1593-
assert (eq("bc", slice("abc", 1u, 3u)));
1594-
assert (eq("", slice("abc", 1u, 1u)));
1598+
assert (eq("ab", unsafe::slice_bytes("abc", 0u, 2u)));
1599+
assert (eq("bc", unsafe::slice_bytes("abc", 1u, 3u)));
1600+
assert (eq("", unsafe::slice_bytes("abc", 1u, 1u)));
15951601
fn a_million_letter_a() -> str {
15961602
let i = 0;
15971603
let rs = "";

0 commit comments

Comments
 (0)