We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7278aea commit d1a9143Copy full SHA for d1a9143
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 439e28b7510919e2ff69c82acef387d08cd1e947
+refs/heads/master: e12b1692478e490fbffdc1aad86e6de627425f8d
trunk/src/libcore/str.rs
@@ -116,14 +116,7 @@ Function: is_whitespace
116
Returns true if the string contains only whitespace
117
*/
118
fn is_whitespace(s: str) -> bool {
119
- let i = 0u;
120
- let len = char_len(s);
121
- while i < len {
122
- // FIXME: This is not how char_at works
123
- if !char::is_whitespace(char_at(s, i)) { ret false; }
124
- i += 1u;
125
- }
126
- ret true;
+ ret loop_chars(s, char::is_whitespace);
127
}
128
129
/*
0 commit comments