patch 9.1.1016: Not possible to convert string2blob and blob2string
Problem: Not possible to convert string2blob and blob2string
Solution: add support for the blob2str() and str2blob() functions
closes: #16373
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/mbyte.c b/src/mbyte.c
index 4a7eada..1570182 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -2107,6 +2107,17 @@
}
/*
+ * Return length of UTF-8 character, obtained from the first byte.
+ * "b" must be between 0 and 255!
+ * Returns 0 for an invalid first byte value.
+ */
+ int
+utf_byte2len_zero(int b)
+{
+ return utf8len_tab_zero[b];
+}
+
+/*
* Get the length of UTF-8 byte sequence "p[size]". Does not include any
* following composing characters.
* Returns 1 for "".