Click here to Skip to main content
15,896,915 members
Articles / Programming Languages / C

SSE accelerated case-insensitive substring search

Rate me:
Please Sign up or sign in to vote.
4.89/5 (14 votes)
14 May 2012CPOL7 min read 29K   274   15  
Another take on the classic, now using SSE instructions
/******************************************************************************

    TITLE     : SSE accelerated case-insensitive substring search
    AUTHOR    : anlarke
    COPYRIGHT : The Code Project Open License (CPOL)
                [http://www.codeproject.com/info/Licenses.aspx]
    DATE      : May 14, 2012

******************************************************************************/

#ifndef __WCSISTR_H__
#define __WCSISTR_H__

#include <wchar.h>

#ifdef __cplusplus
extern "C"
{
#endif

wchar_t* _wsetlocale_map(int category, const wchar_t *locale);
wchar_t towlower_map(wchar_t c);
wchar_t towupper_map(wchar_t c);
const wchar_t* wcsistr(const wchar_t *wcs1, const wchar_t *wcs2);

#ifdef __cplusplus
}
#endif

#endif // __WCSISTR_H__

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Netherlands Netherlands
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions