Skip to content

Commit 6345a92

Browse files
committed
---
yaml --- r: 11235 b: refs/heads/master c: f5e1108 h: refs/heads/master i: 11233: c53f594 11231: da3b12a v: v3
1 parent 20806b0 commit 6345a92

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: faa513b1f616fd831ca7ba2d3a8ad987f83d4a16
2+
refs/heads/master: f5e1108fc360514fd428bc36691982b22a4b0beb
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/libcore/str.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ Returns:
889889
890890
The index of the first occurance of `needle`, or -1 if not found.
891891
892-
FIXME: UTF-8
892+
FIXME: return an option<char position uint> instead
893893
*/
894894
fn find(haystack: str, needle: str) -> int {
895895
let haystack_len: int = len_bytes(haystack) as int;
@@ -1003,7 +1003,6 @@ fn is_whitespace(s: str) -> bool {
10031003
// Function: len_bytes
10041004
//
10051005
// Returns the string length in bytes
1006-
// (Synonym: byte_len)
10071006
pure fn len_bytes(s: str) -> uint unsafe {
10081007
as_bytes(s) { |v|
10091008
let vlen = vec::len(v);
@@ -1013,22 +1012,16 @@ pure fn len_bytes(s: str) -> uint unsafe {
10131012
}
10141013
}
10151014

1016-
// FIXME: remove
1017-
pure fn byte_len(s: str) -> uint unsafe { len_bytes(s) }
1018-
10191015
// Function: len
10201016
//
10211017
// String length or size in characters.
1022-
// (Synonyms: len_chars, char_len)
1018+
// (Synonym: len_chars)
10231019
fn len(s: str) -> uint {
10241020
substr_len_chars(s, 0u, len_bytes(s))
10251021
}
10261022

10271023
fn len_chars(s: str) -> uint { len(s) }
10281024

1029-
// FIXME: remove
1030-
fn char_len(s: str) -> uint { len(s) }
1031-
10321025
/*
10331026
Section: Misc
10341027
*/

0 commit comments

Comments
 (0)