benilla-re systems structs docs

SStrStr

function · storm · boundary

Address
0x64b4f0 · 80 bytes, up to 0x64b53f
Signature
char * __fastcall (const char *haystack, const char *needle)
Meaning
Finds the first place a string occurs in another, case-sensitively; null for an empty haystack or a null argument
Confidence
verified, proof two
Finding
storm/strings#string-find
Test
storm::sstrstr_whole

Finding: String find in storm: string conversions

SStrStr(haystack, needle) (0x64b4f0; 0x64b4a0, SStrStr2, has the same instructions and call targets, with other call displacements) returns the address of the first position of haystack where needle matches, case-sensitively, else null. It tries each position from the start while the byte there is not NUL, comparing the needle's length in bytes through SStrCmp (0x64a480). An empty haystack gives null, even for an empty needle; an empty needle in a non-empty haystack matches at the start. A null argument sets error 0x57 and gives null. SStrStrI (0x64b540) is the same loop over SStrCmpI.

The derivation is in the doc.

Callers 6

Callees 3

Calls and jumps by a bare address, from tables/calls.tsv.