eina: add API for converting strbuf to lowercase.

Summary:
This API would be used in efl_network_websocket.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D3200

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Srivardhan Hebbar 2015-10-21 14:04:43 -07:00 committed by Cedric BAIL
parent 12d8191cb5
commit a356c4e3e8
2 changed files with 17 additions and 0 deletions

View File

@ -197,6 +197,14 @@ eina_strbuf_rtrim(Eina_Strbuf *buf)
((unsigned char *)buf->buf)[buf->len] = '\0';
}
EAPI void
eina_strbuf_tolower(Eina_Strbuf *buf)
{
if (!buf || !(buf->buf)) return;
eina_str_tolower((char **)&(buf->buf));
}
/* Unicode */
#include "eina_strbuf_template_c.x"

View File

@ -641,6 +641,15 @@ EAPI void eina_strbuf_ltrim(Eina_Strbuf *buf) EINA_ARG_NONNULL(1);
*/
EAPI void eina_strbuf_rtrim(Eina_Strbuf *buf) EINA_ARG_NONNULL(1);
/**
* @brief Convert the string to lower case.
*
* @param buf the string buffer to work with.
*
* This function converts all the characters in the strbuf to lower case.
*/
EAPI void eina_strbuf_tolower(Eina_Strbuf *buf) EINA_ARG_NONNULL(1);
/**
* @}
*/