L L4D2node

UTIL_StripToken

0x00b2dba0 · 79 bytes · __cdecl

_Z15UTIL_StripTokenPKcPci

Decompiled

undefined (3 params)

/* UTIL_StripToken(char const*, char*, int) */

void UTIL_StripToken(char *param_1,char *param_2,int param_3)

{
  int iVar1;
  int iVar2;
  char cVar3;
  
  if (((param_3 < 2) || (cVar3 = *param_1, cVar3 == '\0')) || (cVar3 == '#')) {
    iVar1 = 0;
  }
  else {
    iVar2 = 0;
    do {
      iVar1 = iVar2 + 1;
      param_2[iVar2] = cVar3;
      if ((iVar1 == param_3 + -1) || (cVar3 = param_1[iVar1], cVar3 == '\0')) break;
      iVar2 = iVar1;
    } while (cVar3 != '#');
  }
  param_2[iVar1] = '\0';
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)