Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================
  13. #include <string.h>
  14. #include "characterset.h"
  15. // memdbgon must be the last include file in a .cpp file!!!
  16. #include "tier0/memdbgon.h"
  17. //-----------------------------------------------------------------------------
  18. // Purpose: builds a simple lookup table of a group of important characters
  19. // Input : *pParseGroup - pointer to the buffer for the group
  20. // *pGroupString - null terminated list of characters to flag
  21. //-----------------------------------------------------------------------------
  22. void CharacterSetBuild( characterset_t *pSetBuffer, const char *pszSetString )
  23. {
  24. int i = 0;
  25. // Test our pointers
  26. if ( !pSetBuffer || !pszSetString )
  27. return;
  28. memset( pSetBuffer->set, 0, sizeof(pSetBuffer->set) );
  29. while ( pszSetString[i] )
  30. {
  31. pSetBuffer->set[ pszSetString[i] ] = 1;
  32. i++;
  33. }
  34. }