From 2d7472d16067f1a03c3d76bfa05e6b7871042549 Mon Sep 17 00:00:00 2001 From: Nathan Bowhay Date: Thu, 29 Jan 2015 11:51:05 -0800 Subject: [PATCH] add case sensitive strings Added case sensitive strings function to add them to the string table. --- Engine/source/console/consoleFunctions.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Engine/source/console/consoleFunctions.cpp b/Engine/source/console/consoleFunctions.cpp index 47a57ecdb..f08ad2ac4 100644 --- a/Engine/source/console/consoleFunctions.cpp +++ b/Engine/source/console/consoleFunctions.cpp @@ -1112,6 +1112,17 @@ DefineConsoleFunction( isValidIP, bool, ( const char* str),, return isValidIP(str); } +//---------------------------------------------------------------- + +// Torque won't normally add another string if it already exists with another casing, +// so this forces the addition. It should be called once near the start, such as in main.cs. +ConsoleFunction(addCaseSensitiveStrings,void,2,0,"[string1, string2, ...]" + "Adds case sensitive strings to the StringTable.") +{ + for(int i = 1; i < argc; i++) + StringTable->insert(argv[i], true); +} + //============================================================================= // Field Manipulators. //=============================================================================