dtSearch Text Retrieval Engine Programmer's Reference
DStringSet Class

Simple string set class for use in the dtSearch C++ Support classes and sample code.

File: dstring.h 

Namespace: dtSearch 

class DStringSet;

Usually the text in a DStringSet is stored as UTF-8, although any single-byte character set can be used. 

In the dtSearch Engine's C++ API, several API elements expect a set of strings, such as the folders to index in dtsIndexJob or the indexes to search in dtsSearchJob, formatted as a null-delimited string set Each string is separated by a single null character, with a double-null at the end, like this:

"First string\0 Second string\0 Third string \0\0"

DStringSet provides a class to construct this type of string set. To create a null-delimited string set from a set of strings, declare a DStringSet, call append() with each string, and then call getBuffer() to get the start of the buffer. Example:

DStringSet excludeFilters; excludeFilters.append("*.exe"); excludeFilters.append("*.dll"); excludeFilters.append("*.fon"); dtsIndexJob indexJob; indexJob.toAdd.excludeFilters = excludeFilters.getBuffer();