cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a356c4e3e8cea183ceeb910fe710490f18255a74
commit a356c4e3e8cea183ceeb910fe710490f18255a74 Author: Srivardhan Hebbar <sri.heb...@samsung.com> Date: Wed Oct 21 14:04:43 2015 -0700 eina: add API for converting strbuf to lowercase. Summary: This API would be used in efl_network_websocket. Signed-off-by: Srivardhan Hebbar <sri.heb...@samsung.com> Reviewers: cedric Differential Revision: https://phab.enlightenment.org/D3200 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/eina/eina_strbuf.c | 8 ++++++++ src/lib/eina/eina_strbuf.h | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/src/lib/eina/eina_strbuf.c b/src/lib/eina/eina_strbuf.c index 828d842..ff461a7 100644 --- a/src/lib/eina/eina_strbuf.c +++ b/src/lib/eina/eina_strbuf.c @@ -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" diff --git a/src/lib/eina/eina_strbuf.h b/src/lib/eina/eina_strbuf.h index 1a628b9..3799a3d 100644 --- a/src/lib/eina/eina_strbuf.h +++ b/src/lib/eina/eina_strbuf.h @@ -642,6 +642,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); + +/** * @} */ --