summaryrefslogtreecommitdiff
path: root/doc/en/weechat_plugin_api.en.txt
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-11-12 10:37:44 +0100
committerSebastien Helleu <flashcode@flashtux.org>2011-11-12 10:37:44 +0100
commit491412b314f6a9db9de5d24daee7196bf5dfbdf5 (patch)
treec060cb6d2cb15da15aa7811055807d5faaa61aaf /doc/en/weechat_plugin_api.en.txt
parent538e8257f6c25c465d171c93552da896e4b09c91 (diff)
downloadweechat-491412b314f6a9db9de5d24daee7196bf5dfbdf5.zip
api: add new functions strcasecmp_range and strncasecmp_range
Diffstat (limited to 'doc/en/weechat_plugin_api.en.txt')
-rw-r--r--doc/en/weechat_plugin_api.en.txt89
1 files changed, 89 insertions, 0 deletions
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt
index 7e04f3333..126f2c7db 100644
--- a/doc/en/weechat_plugin_api.en.txt
+++ b/doc/en/weechat_plugin_api.en.txt
@@ -596,6 +596,50 @@ int diff = weechat_strcasecmp ("aaa", "CCC"); /* == -2 */
[NOTE]
This function is not available in scripting API.
+weechat_strcasecmp_range
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+_New in version 0.3.7._
+
+Locale and case independent string comparison, using a range for case
+comparison.
+
+Prototype:
+
+[source,C]
+----------------------------------------
+int weechat_strcasecmp_range (const char *string1, const char *string2, int range);
+----------------------------------------
+
+Arguments:
+
+* 'string1': first string for comparison
+* 'string2': second string for comparison
+* 'range': number of chars in case comparison, for example:
+** 26: "A-Z" are lowered to "a-z"
+** 29: "A-Z [ \ ]" are lowered to "a-z { | }"
+** 30: "A-Z [ \ ] ^" are lowered to "a-z { | } ~"
+
+[NOTE]
+Values 29 and 30 are used by some protocols like IRC.
+
+Return value:
+
+* difference between two strings:
+** negative if string1 < string2
+** zero if string1 == string2
+** positive if string1 > string2
+
+C example:
+
+[source,C]
+----------------------------------------
+int diff = weechat_strcasecmp_range ("nick{away}", "NICK[away]", 29); /* == 0 */
+----------------------------------------
+
+[NOTE]
+This function is not available in scripting API.
+
weechat_strncasecmp
^^^^^^^^^^^^^^^^^^^
@@ -631,6 +675,51 @@ int diff = weechat_strncasecmp ("aabb", "aacc", 2); /* == 0 */
[NOTE]
This function is not available in scripting API.
+weechat_strncasecmp_range
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+_New in version 0.3.7._
+
+Locale and case independent string comparison, for 'max' chars, using a range
+for case comparison.
+
+Prototype:
+
+[source,C]
+----------------------------------------
+int weechat_strncasecmp_range (const char *string1, const char *string2, int max, int range);
+----------------------------------------
+
+Arguments:
+
+* 'string1': first string for comparison
+* 'string2': second string for comparison
+* 'max': max chars to compare
+* 'range': number of chars in case comparison, for example:
+** 26: "A-Z" are lowered to "a-z"
+** 29: "A-Z [ \ ]" are lowered to "a-z { | }"
+** 30: "A-Z [ \ ] ^" are lowered to "a-z { | } ~"
+
+[NOTE]
+Values 29 and 30 are used by some protocols like IRC.
+
+Return value:
+
+* difference between two strings:
+** negative if string1 < string2
+** zero if string1 == string2
+** positive if string1 > string2
+
+C example:
+
+[source,C]
+----------------------------------------
+int diff = weechat_strncasecmp_range ("nick{away}", "NICK[away]", 6, 29); /* == 0 */
+----------------------------------------
+
+[NOTE]
+This function is not available in scripting API.
+
weechat_strcmp_ignore_chars
^^^^^^^^^^^^^^^^^^^^^^^^^^^