diff --git a/core/smn_string.cpp b/core/smn_string.cpp index fbeb139f..cca8271f 100644 --- a/core/smn_string.cpp +++ b/core/smn_string.cpp @@ -330,9 +330,11 @@ REGISTER_NATIVES(basicStrings) {"strlen", sm_strlen}, {"StrBreak", StrBreak}, {"StrContains", sm_contain}, - {"StrCompare", sm_strcmp}, - {"StrCompareN", sm_strncmp}, - {"StrCopy", sm_strcopy}, + {"strcmp", sm_strcmp}, + {"StrCompare", sm_strcmp}, /* Backwards compat shim */ + {"strncmp", sm_strncmp}, + {"strcopy", sm_strcopy}, + {"StrCopy", sm_strcopy}, /* Backwards compat shim */ {"StringToInt", sm_strconvint}, {"IntToString", sm_numtostr}, {"StringToFloat", sm_strtofloat}, diff --git a/plugins/include/string.inc b/plugins/include/string.inc index 5060a0bf..3821209d 100644 --- a/plugins/include/string.inc +++ b/plugins/include/string.inc @@ -73,6 +73,7 @@ native strncmp(const String:str1[], const String:str2[], num, bool:caseSensitive /** * Backwards compatible stock - StrCompare is now strcmp + * @deprecated Renamed to strcmp */ stock StrCompare(const String:str1[], const String:str2[], bool:caseSensitive=true) { @@ -104,7 +105,16 @@ stock bool:StrEqual(const String:str1[], const String:str2[], bool:caseSensitive * @param source Source string buffer to copy from. * @return Number of cells written. */ -native StrCopy(String:dest[], destLen, const String:source[]); +native strcopy(String:dest[], destLen, const String:source[]); + +/** + * Backwards compatibility stock - use strcopy + * @deprecated Renamed to strcopy + */ +stock StrCopy(String:dest[], destLen, const String:source[]) +{ + return strcopy(dest, destLen, source); +} /** * Formats a string according to the SourceMod format rules (see documentation).