about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-02-12 06:26:07 -0800
committerKevin Cantu <me@kevincantu.org>2012-02-12 15:30:21 -0800
commitf5e1108fc360514fd428bc36691982b22a4b0beb (patch)
tree41d3fb288200ceb9006d29049dd77e76dd10bd7f
parentfaa513b1f616fd831ca7ba2d3a8ad987f83d4a16 (diff)
downloadrust-f5e1108fc360514fd428bc36691982b22a4b0beb.tar.gz
rust-f5e1108fc360514fd428bc36691982b22a4b0beb.zip
(core::str) comments and cleanup
-rw-r--r--src/libcore/str.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/libcore/str.rs b/src/libcore/str.rs
index a527a79935c..5d39fb72b7e 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -889,7 +889,7 @@ Returns:
 
 The index of the first occurance of `needle`, or -1 if not found.
 
-FIXME: UTF-8
+FIXME: return an option<char position uint> instead
 */
 fn find(haystack: str, needle: str) -> int {
     let haystack_len: int = len_bytes(haystack) as int;
@@ -1003,7 +1003,6 @@ fn is_whitespace(s: str) -> bool {
 // Function: len_bytes
 //
 // Returns the string length in bytes
-// (Synonym: byte_len)
 pure fn len_bytes(s: str) -> uint unsafe {
     as_bytes(s) { |v|
         let vlen = vec::len(v);
@@ -1013,22 +1012,16 @@ pure fn len_bytes(s: str) -> uint unsafe {
     }
 }
 
-// FIXME: remove
-pure fn byte_len(s: str) -> uint unsafe { len_bytes(s) }
-
 // Function: len
 //
 // String length or size in characters.
-// (Synonyms: len_chars, char_len)
+// (Synonym: len_chars)
 fn len(s: str) -> uint {
     substr_len_chars(s, 0u, len_bytes(s))
 }
 
 fn len_chars(s: str) -> uint { len(s) }
 
-// FIXME: remove
-fn char_len(s: str) -> uint { len(s) }
-
 /*
 Section: Misc
 */