V_strnlwr
0x00048a10 · 82 bytes · __cdecl
_Z9V_strnlwrPcj
Decompiled
undefined (2 params)
/* V_strnlwr(char*, unsigned int) */
char * V_strnlwr(char *param_1,uint param_2)
{
char cVar1;
char *pcVar2;
int iVar3;
char *pcVar4;
int iVar5;
if ((param_1 != (char *)0x0) && (param_2 != 0)) {
iVar5 = param_2 - 1;
pcVar4 = param_1;
if (iVar5 == 0) {
LAB_00048a5a:
*pcVar4 = '\0';
}
else {
cVar1 = *param_1;
pcVar2 = param_1;
while (cVar1 != '\0') {
pcVar4 = pcVar2 + 1;
iVar3 = tolower((int)cVar1);
*pcVar2 = (char)iVar3;
iVar5 = iVar5 + -1;
if (iVar5 == 0) goto LAB_00048a5a;
pcVar2 = pcVar4;
cVar1 = *pcVar4;
}
}
}
return param_1;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.