diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs index 0ed40e2..c5c9b33 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1340,6 +1340,15 @@ impl<'a, 'ph: 'a> ValidContext<'a, 'ph> { } /// Compares two nicks based on the server's case mapping. + /// + /// ```no_run + /// use hexchat_unsafe_plugin::ValidContext; + /// + /// /// Checks if the two nicks below are equal. + /// fn compare_nicks(context: ValidContext<'_, '_>) -> bool { + /// context.nickcmp("hello", "HELLO").is_eq() + /// } + /// ``` pub fn nickcmp(&self, nick1: &str, nick2: &str) -> std::cmp::Ordering { use std::cmp::Ordering; let ph = &self.ph; |