1
Fork 0

rustc: Add a str_eq lang item for pattern matching

This commit is contained in:
Patrick Walton 2012-09-07 15:45:11 -07:00
parent 2572e80355
commit 1fcfee674a
3 changed files with 30 additions and 23 deletions

View file

@ -713,6 +713,7 @@ Section: Comparing strings
*/
/// Bytewise slice equality
#[lang="str_eq"]
pure fn eq_slice(a: &str, b: &str) -> bool {
do as_buf(a) |ap, alen| {
do as_buf(b) |bp, blen| {