Skip to content

Commit 716bad2

Browse files
committed
---
yaml --- r: 6053 b: refs/heads/master c: 6f37acc h: refs/heads/master i: 6051: 7ccd240 v: v3
1 parent 28564cb commit 716bad2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: b0d60a7108bf022f743501b7b2e127fbae695260
2+
refs/heads/master: 6f37accb290e29f812b324853f991c2c575e0de6

trunk/src/lib/str.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export eq, lteq, hash, is_empty, is_not_empty, is_whitespace, byte_len, index,
1111
to_chars, char_len, char_at, bytes, is_ascii, shift_byte, pop_byte,
1212
unsafe_from_byte, unsafe_from_bytes, from_char, char_range_at,
1313
str_from_cstr, sbuf, as_buf, push_byte, utf8_char_width, safe_slice,
14-
contains, chars;
14+
contains, iter_chars;
1515

1616
native "c-stack-cdecl" mod rustrt {
1717
fn rust_str_push(&s: str, ch: u8);
@@ -300,12 +300,12 @@ Pluck a character out of a string
300300
fn char_at(s: str, i: uint) -> char { ret char_range_at(s, i).ch; }
301301

302302
/*
303-
Function: chars
303+
Function: iter_chars
304304
305305
Iterate over the characters in a string
306306
*/
307307

308-
fn chars(s: str, it: block(char)) {
308+
fn iter_chars(s: str, it: block(char)) {
309309
let pos = 0u, len = byte_len(s);
310310
while (pos < len) {
311311
let {ch, next} = char_range_at(s, pos);

trunk/src/test/stdtest/str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ fn contains() {
317317
}
318318

319319
#[test]
320-
fn chars() {
320+
fn iter_chars() {
321321
let i = 0;
322-
str::chars("x\u03c0y") {|ch|
322+
str::iter_chars("x\u03c0y") {|ch|
323323
alt i {
324324
0 { assert ch == 'x'; }
325325
1 { assert ch == '\u03c0'; }

0 commit comments

Comments
 (0)