summaryrefslogtreecommitdiff
path: root/public/UnicodeFileHelpers.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/UnicodeFileHelpers.h
downloadarchived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz
archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip
Diffstat (limited to 'public/UnicodeFileHelpers.h')
-rw-r--r--public/UnicodeFileHelpers.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/public/UnicodeFileHelpers.h b/public/UnicodeFileHelpers.h
new file mode 100644
index 0000000..df35f71
--- /dev/null
+++ b/public/UnicodeFileHelpers.h
@@ -0,0 +1,28 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef UNICODEFILEHELPERS_H
+#define UNICODEFILEHELPERS_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <stdlib.h>
+
+// helper functions for parsing unicode file buffers
+ucs2 *AdvanceOverWhitespace(ucs2 *start);
+ucs2 *ReadUnicodeToken(ucs2 *start, ucs2 *token, int tokenBufferSize, bool &quoted);
+ucs2 *ReadUnicodeTokenNoSpecial(ucs2 *start, ucs2 *token, int tokenBufferSize, bool &quoted);
+ucs2 *ReadToEndOfLine(ucs2 *start);
+
+// writing to unicode files via CUtlBuffer
+class CUtlBuffer;
+void WriteUnicodeString(CUtlBuffer &buffer, const wchar_t *string, bool addQuotes = false);
+void WriteAsciiStringAsUnicode(CUtlBuffer &buffer, const char *string, bool addQuotes = false);
+
+
+
+#endif // UNICODEFILEHELPERS_H