Returns whether `self` has a suffix of `other`. Note that `Pointer::root` is only a valid suffix of itself.
(&self, other: &Self)
| 280 | /// |
| 281 | /// Note that `Pointer::root` is only a valid suffix of itself. |
| 282 | pub fn ends_with(&self, other: &Self) -> bool { |
| 283 | (self.is_root() && other.is_root()) |
| 284 | || (!other.is_root() && self.as_str().ends_with(&other.0)) |
| 285 | } |
| 286 | |
| 287 | /// Returns whether `self` has a prefix of `other.` |
| 288 | /// |