TableGen !find operator

I’ve implemented the !find operator for TableGen.

!find(source_string, target_string [, start-pos])

It returns the position of the target_string in the source_string. The question is: What should it return if the there is no match?

std::string::find() returns npos, which is ~size_t(0). TableGen’s integers are signed. So it could return -1, or it could return the maximum positive signed integer. Or, it could break with tradition and return the length of the source_string. The easiest thing to test for is -1.

Opinions, please.