summaryrefslogtreecommitdiff
path: root/doc/en
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-07-05 11:38:44 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-07-05 11:38:44 +0200
commit95011c82e0ab9f15fc6508d1aebe2ec0f86ccb94 (patch)
treedd34c5f0bb0222c6bef3010030a79272794729b7 /doc/en
parent823db4475c33673dca6a832a64cd836df9e42c52 (diff)
downloadweechat-95011c82e0ab9f15fc6508d1aebe2ec0f86ccb94.zip
core: return only -1, 0 or 1 in string comparison functions
Diffstat (limited to 'doc/en')
-rw-r--r--doc/en/weechat_plugin_api.en.asciidoc63
1 files changed, 33 insertions, 30 deletions
diff --git a/doc/en/weechat_plugin_api.en.asciidoc b/doc/en/weechat_plugin_api.en.asciidoc
index f0bc3c351..47846da05 100644
--- a/doc/en/weechat_plugin_api.en.asciidoc
+++ b/doc/en/weechat_plugin_api.en.asciidoc
@@ -546,6 +546,8 @@ This function is not available in scripting API.
==== weechat_strcasecmp
+_Updated in 1.0._
+
Locale and case independent string comparison.
Prototype:
@@ -562,10 +564,9 @@ Arguments:
Return value:
-* difference between two strings:
-** negative if string1 < string2
-** zero if string1 == string2
-** positive if string1 > string2
+* -1 if string1 < string2
+* 0 if string1 == string2
+* 1 if string1 > string2
C example:
@@ -579,7 +580,7 @@ This function is not available in scripting API.
==== weechat_strcasecmp_range
-_WeeChat ≥ 0.3.7._
+_WeeChat ≥ 0.3.7, updated in 1.0._
Locale and case independent string comparison, using a range for case
comparison.
@@ -605,10 +606,9 @@ 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
+* -1 if string1 < string2
+* 0 if string1 == string2
+* 1 if string1 > string2
C example:
@@ -622,6 +622,8 @@ This function is not available in scripting API.
==== weechat_strncasecmp
+_Updated in 1.0._
+
Locale and case independent string comparison, for 'max' chars.
Prototype:
@@ -639,10 +641,9 @@ Arguments:
Return value:
-* difference between two strings:
-** negative if string1 < string2
-** zero if string1 == string2
-** positive if string1 > string2
+* -1 if string1 < string2
+* 0 if string1 == string2
+* 1 if string1 > string2
C example:
@@ -656,7 +657,7 @@ This function is not available in scripting API.
==== weechat_strncasecmp_range
-_WeeChat ≥ 0.3.7._
+_WeeChat ≥ 0.3.7, updated in 1.0._
Locale and case independent string comparison, for 'max' chars, using a range
for case comparison.
@@ -683,10 +684,9 @@ 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
+* -1 if string1 < string2
+* 0 if string1 == string2
+* 1 if string1 > string2
C example:
@@ -700,6 +700,8 @@ This function is not available in scripting API.
==== weechat_strcmp_ignore_chars
+_Updated in 1.0._
+
Locale (and optionally case independent) string comparison, ignoring some
chars.
@@ -721,10 +723,9 @@ Arguments:
Return value:
-* difference between two strings:
-** negative if string1 < string2
-** zero if string1 == string2
-** positive if string1 > string2
+* -1 if string1 < string2
+* 0 if string1 == string2
+* 1 if string1 > string2
C example:
@@ -2201,6 +2202,8 @@ This function is not available in scripting API.
==== weechat_utf8_charcmp
+_Updated in 1.0._
+
Compare two UTF-8 chars.
Prototype:
@@ -2217,10 +2220,9 @@ Arguments:
Return value:
-* difference between first char of each string:
-** negative if char1 < char2
-** zero if char1 == char2
-** positive if char1 > char2
+* -1 if string1 < string2
+* 0 if string1 == string2
+* 1 if string1 > string2
C example:
@@ -2234,6 +2236,8 @@ This function is not available in scripting API.
==== weechat_utf8_charcasecmp
+_Updated in 1.0._
+
Compare two UTF-8 chars, ignoring case.
Prototype:
@@ -2250,10 +2254,9 @@ Arguments:
Return value:
-* difference between first char of each string:
-** negative if char1 < char2
-** zero if char1 == char2
-** positive if char1 > char2
+* -1 if string1 < string2
+* 0 if string1 == string2
+* 1 if string1 > string2
C example: