[sword-devel] ListKey contains key

Troy A. Griffitts scribe at crosswire.org
Fri Apr 10 11:02:09 MST 2009

Manfred Bergmann wrote:
> I've tried the following and it seemed to work but I'm not sure this is 
> correct API usage:
> ListKey lk = vk.ParseVerseList("Gen 1:1-5", "Gen1", true);
> lk = "Gen 1:3";
> BOOL contains = !lk.Error();

Dear Manfred,

Yes, this is exactly the desired behaviour.  If you attempt to set a key 
to a value outside its bounds, it will be set to the closest value 
within its bounds and set error to KEYERR_OUTOFBOUNDS.

More information about the sword-devel mailing list