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.

28 lines
898 B

  1. //========= Copyright 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef UNICODEFILEHELPERS_H
  7. #define UNICODEFILEHELPERS_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include <stdlib.h>
  12. // helper functions for parsing unicode file buffers
  13. ucs2 *AdvanceOverWhitespace(ucs2 *start);
  14. ucs2 *ReadUnicodeToken(ucs2 *start, ucs2 *token, int tokenBufferSize, bool &quoted);
  15. ucs2 *ReadUnicodeTokenNoSpecial(ucs2 *start, ucs2 *token, int tokenBufferSize, bool &quoted);
  16. ucs2 *ReadToEndOfLine(ucs2 *start);
  17. // writing to unicode files via CUtlBuffer
  18. class CUtlBuffer;
  19. void WriteUnicodeString(CUtlBuffer &buffer, const wchar_t *string, bool addQuotes = false);
  20. void WriteAsciiStringAsUnicode(CUtlBuffer &buffer, const char *string, bool addQuotes = false);
  21. #endif // UNICODEFILEHELPERS_H