1
Fork 0

core: rename str::lteq to str::le

This commit is contained in:
Tom Lee 2012-02-03 03:28:49 -08:00 committed by Marijn Haverbeke
parent 633e4502e7
commit 31b0d1b4bd
4 changed files with 10 additions and 10 deletions

View file

@ -54,7 +54,7 @@ export
// Comparing strings
eq,
lteq,
le,
hash,
// Iterating through strings
@ -704,11 +704,11 @@ Bytewise string equality
pure fn eq(&&a: str, &&b: str) -> bool { a == b }
/*
Function: lteq
Function: le
Bytewise less than or equal
*/
pure fn lteq(&&a: str, &&b: str) -> bool { a <= b }
pure fn le(&&a: str, &&b: str) -> bool { a <= b }
/*
Function: hash
@ -1381,10 +1381,10 @@ mod tests {
}
#[test]
fn test_lteq() {
assert (lteq("", ""));
assert (lteq("", "foo"));
assert (lteq("foo", "foo"));
fn test_le() {
assert (le("", ""));
assert (le("", "foo"));
assert (le("foo", "foo"));
assert (!eq("foo", "bar"));
}