VM_strdecolorize, // #477 string(string s) : DRESK - Decolorized String (DP_QC_STRINGCOLORFUNCTIONS)
VM_strftime, // #478 string(float uselocaltime, string format, ...) (DP_QC_STRFTIME)
VM_tokenizebyseparator, // #479 float(string s) tokenizebyseparator (DP_QC_TOKENIZEBYSEPARATOR)
-NULL, // #480
-NULL, // #481
+VM_strtolower, // #480 string(string s) VM_strtolower : DRESK - Return string as lowercase
+VM_strtoupper, // #481 string(string s) VM_strtoupper : DRESK - Return string as uppercase
NULL, // #482
NULL, // #483
NULL, // #484
size_t COM_StringLengthNoColors(const char *s, size_t size_s, qboolean *valid);
qboolean COM_StringDecolorize(const char *in, size_t size_in, char *out, size_t size_out, qboolean escape_carets);
+void COM_ToLowerString (const char *in, char *out, size_t size_out);
+void COM_ToUpperString (const char *in, char *out, size_t size_out);
typedef struct stringlist_s
{
"DP_MENU_EXTRESPONSEPACKET "
"DP_QC_ASINACOSATANATAN2TAN "
"DP_QC_STRFTIME "
+"DP_QC_STRING_CASE_FUNCTIONS "
"DP_QC_STRINGCOLORFUNCTIONS "
"DP_QC_TOKENIZEBYSEPARATOR "
"DP_QC_UNLIMITEDTEMPSTRINGS "
VM_strdecolorize, // #477 string(string s) : DRESK - Decolorized String (DP_QC_STRINGCOLORFUNCTIONS)
VM_strftime, // #478 string(float uselocaltime, string format, ...) (DP_QC_STRFTIME)
VM_tokenizebyseparator, // #479 float(string s) tokenizebyseparator (DP_QC_TOKENIZEBYSEPARATOR)
-NULL, // #480
-NULL, // #481
+VM_strtolower, // #480 string(string s) VM_strtolower : DRESK - Return string as lowercase
+VM_strtoupper, // #481 string(string s) VM_strtoupper : DRESK - Return string as uppercase
NULL, // #482
NULL, // #483
NULL, // #484
PRVM_G_FLOAT(OFS_RETURN) = nCnt;
}
+// DRESK - String to Uppercase and Lowercase
+/*
+=========
+VM_strtolower
+
+string strtolower(string s)
+=========
+*/
+// string (string s) strtolower = #480; // returns passed in string in lowercase form
+void VM_strtolower(void)
+{
+ char szNewString[VM_STRINGTEMP_LENGTH];
+ const char *szString;
+
+ // Prepare Strings
+ VM_SAFEPARMCOUNT(1,VM_strtolower);
+ szString = PRVM_G_STRING(OFS_PARM0);
+
+ COM_ToLowerString(szString, szNewString, sizeof(szNewString) );
+
+ PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(szNewString);
+}
+
+/*
+=========
+VM_strtoupper
+
+string strtoupper(string s)
+=========
+*/
+// string (string s) strtoupper = #481; // returns passed in string in uppercase form
+void VM_strtoupper(void)
+{
+ char szNewString[VM_STRINGTEMP_LENGTH];
+ const char *szString;
+
+ // Prepare Strings
+ VM_SAFEPARMCOUNT(1,VM_strtoupper);
+ szString = PRVM_G_STRING(OFS_PARM0);
+
+ COM_ToUpperString(szString, szNewString, sizeof(szNewString) );
+
+ PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(szNewString);
+}
+
/*
=========
VM_strcat
void VM_strlennocol(void);
// DRESK - Decolorized String
void VM_strdecolorize(void);
+// DRESK - String Uppercase and Lowercase Support
+void VM_strtolower(void);
+void VM_strtoupper(void);
void VM_clcommand (void);
"DP_QC_RANDOMVEC "
"DP_QC_SINCOSSQRTPOW "
"DP_QC_STRFTIME "
+"DP_QC_STRING_CASE_FUNCTIONS "
"DP_QC_STRINGBUFFERS "
"DP_QC_STRINGCOLORFUNCTIONS "
"DP_QC_TOKENIZEBYSEPARATOR "
VM_strdecolorize, // #477 string(string s) : DRESK - Decolorized String (DP_SV_STRINGCOLORFUNCTIONS)
VM_strftime, // #478 string(float uselocaltime, string format, ...) (DP_QC_STRFTIME)
VM_tokenizebyseparator, // #479 float(string s) tokenizebyseparator (DP_QC_TOKENIZEBYSEPARATOR)
-NULL, // #480
-NULL, // #481
+VM_strtolower, // #480 string(string s) VM_strtolower : DRESK - Return string as lowercase
+VM_strtoupper, // #481 string(string s) VM_strtoupper : DRESK - Return string as uppercase
NULL, // #482
NULL, // #483
NULL, // #484