Download demo project - 21 Kb
Introduction
XMemString
is a collection of memory and string search functions I have been using for many years. They are all modelled on the functions available in the standard C runtime, so they are fairly self-explanatory.
Function Descriptions
memichr()
- Find character in a buffer (case insensitive).
memimem()
- Find a byte sequence within a memory buffer (case insensitive)
memmem()
- Find a byte sequence within a memory buffer
_tcsistr()
- Find a substring within a string (case insensitive)
How To Use
To integrate XMemString
functions into your app, you first need to add following files to your project:
- XMemString.cpp
- XMemString.h
If you include XMemString
in project that uses precompiled headers, you must change C/C++ Precompiled Headers settings to Not using precompiled headers for XMemString.cpp.
Next, include the header file XMemString.h in appropriate project files. Now you are ready to start using XMemString
. Please see XMemStringTest.cpp for examples.
Revision History
Version 1.0 - 2003 May 11
Usage
This software is released into the public domain. You are free to use it in any way you like. If you modify it or extend it, please to consider posting new code here for everyone to share. This software is provided "as is" with no expressed or implied warranty. I accept no liability for any damage or loss of business that this software may cause.
I attended St. Michael's College of the University of Toronto, with the intention of becoming a priest. A friend in the University's Computer Science Department got me interested in programming, and I have been hooked ever since.
Recently, I have moved to Los Angeles where I am doing consulting and development work.
For consulting and custom software development, please see
www.hdsoft.org.