He said szMap (from the .ini file) is smaller than szCurMap, e.g. only a portion or "prefix" of the maps he wants to target.
This code checks if szCurMap contains szMap at position 0, so the beginning of szCurMap (contain & containi both return the position of where the string was found in the source string):
PHP Code:
if ( contain( szCurMap, szMap ) == 0 )
If szCurMap is ab2_2_1 and szMap is ab2_2, it should return 0 and therefore work as expected.
I hope I understood your problem, if not feel free to share more detailed info.
- LegacyCode
Actually OciXCrom's code does the same thing. Take a look at what the third param does and what he passed as an argument to it.