Skip to main content

eq

Function eq 

Source
pub const fn eq<Lhs, Rhs>(_: Lhs, _: Rhs) -> bool
where Lhs: IsTStr, Rhs: IsTStr,
Expand description

Compares two IsTStrs for equality

This is a non-associated function for const compatibility, the (non-const) trait method equivalent of this is IsTStr::tstr_eq

ยงExamples

use tstr::ts;

const _: () = assert!( tstr::eq(ts!("foo"), ts!("foo")));

const _: () = assert!(!tstr::eq(ts!("foo"), ts!("bar")));