File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -889,7 +889,7 @@ Returns:
889889
890890The 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*/
894894fn 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)
10071006pure 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)
10231019fn len ( s : str ) -> uint {
10241020 substr_len_chars ( s, 0 u, len_bytes ( s) )
10251021}
10261022
10271023fn len_chars ( s : str ) -> uint { len ( s) }
10281024
1029- // FIXME: remove
1030- fn char_len ( s : str ) -> uint { len ( s) }
1031-
10321025/*
10331026Section: Misc
10341027*/
You can’t perform that action at this time.
0 commit comments