From 4547270934734edbdc1d4b6cf4c55fb5253b6bac Mon Sep 17 00:00:00 2001 From: rtldg <55846624+rtldg@users.noreply.github.com> Date: Fri, 25 Feb 2022 23:20:12 +0000 Subject: [PATCH] Correct some function docs that return char count (#1721) --- plugins/include/string.inc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/plugins/include/string.inc b/plugins/include/string.inc index c64d30db..72873e42 100644 --- a/plugins/include/string.inc +++ b/plugins/include/string.inc @@ -121,7 +121,8 @@ stock bool StrEqual(const char[] str1, const char[] str2, bool caseSensitive=tru * @param dest Destination string buffer to copy to. * @param destLen Destination buffer length (includes null terminator). * @param source Source string buffer to copy from. - * @return Number of cells written. + * @return Number of characters written to the buffer, + * not including the null terminator. */ native int strcopy(char[] dest, int destLen, const char[] source); @@ -142,7 +143,8 @@ stock int StrCopy(char[] dest, int destLen, const char[] source) * @param maxlength Maximum length of output string buffer. * @param format Formatting rules. * @param ... Variable number of format parameters. - * @return Number of cells written. + * @return Number of characters written to the buffer, + * not including the null terminator. */ native int Format(char[] buffer, int maxlength, const char[] format, any ...); @@ -156,7 +158,8 @@ native int Format(char[] buffer, int maxlength, const char[] format, any ...); * @param maxlength Maximum length of output string buffer. * @param format Formatting rules. * @param ... Variable number of format parameters. - * @return Number of cells written. + * @return Number of characters written to the buffer, + * not including the null terminator. */ native int FormatEx(char[] buffer, int maxlength, const char[] format, any ...); @@ -212,7 +215,8 @@ native int StringToInt64(const char[] str, int result[2], int nBase=10); * @param num Integer to convert. * @param str Buffer to store string in. * @param maxlength Maximum length of string buffer. - * @return Number of cells written to buffer. + * @return Number of characters written to the buffer, + * not including the null terminator. */ native int IntToString(int num, char[] str, int maxlength); @@ -251,7 +255,8 @@ native int StringToFloatEx(const char[] str, float &result); * @param num Floating point number to convert. * @param str Buffer to store string in. * @param maxlength Maximum length of string buffer. - * @return Number of cells written to buffer. + * @return Number of characters written to the buffer, + * not including the null terminator. */ native int FloatToString(float num, char[] str, int maxlength);