@@ -199,6 +199,8 @@ bool ConvertBits(const O& outfn, I it, I end) {
199199 * Converts the given character to its lowercase equivalent.
200200 * This function is locale independent. It only converts uppercase
201201 * characters in the standard 7-bit ASCII range.
202+ * This is a feature, not a limitation.
203+ *
202204 * @param[in] c the character to convert to lowercase.
203205 * @return the lowercase equivalent of c; or the argument
204206 * if no conversion is possible.
@@ -209,17 +211,22 @@ constexpr char ToLower(char c)
209211}
210212
211213/* *
212- * Converts the given string to its lowercase equivalent .
214+ * Returns the lowercase equivalent of the given string .
213215 * This function is locale independent. It only converts uppercase
214216 * characters in the standard 7-bit ASCII range.
215- * @param[in,out] str the string to convert to lowercase.
217+ * This is a feature, not a limitation.
218+ *
219+ * @param[in] str the string to convert to lowercase.
220+ * @returns lowercased equivalent of str
216221 */
217- void Downcase ( std::string& str);
222+ std::string ToLower ( const std::string& str);
218223
219224/* *
220225 * Converts the given character to its uppercase equivalent.
221226 * This function is locale independent. It only converts lowercase
222227 * characters in the standard 7-bit ASCII range.
228+ * This is a feature, not a limitation.
229+ *
223230 * @param[in] c the character to convert to uppercase.
224231 * @return the uppercase equivalent of c; or the argument
225232 * if no conversion is possible.
@@ -229,13 +236,25 @@ constexpr char ToUpper(char c)
229236 return (c >= ' a' && c <= ' z' ? (c - ' a' ) + ' A' : c);
230237}
231238
239+ /* *
240+ * Returns the uppercase equivalent of the given string.
241+ * This function is locale independent. It only converts lowercase
242+ * characters in the standard 7-bit ASCII range.
243+ * This is a feature, not a limitation.
244+ *
245+ * @param[in] str the string to convert to uppercase.
246+ * @returns UPPERCASED EQUIVALENT OF str
247+ */
248+ std::string ToUpper (const std::string& str);
249+
232250/* *
233251 * Capitalizes the first character of the given string.
234- * This function is locale independent. It only capitalizes the
235- * first character of the argument if it has an uppercase equivalent
236- * in the standard 7-bit ASCII range.
252+ * This function is locale independent. It only converts lowercase
253+ * characters in the standard 7-bit ASCII range.
254+ * This is a feature, not a limitation.
255+ *
237256 * @param[in] str the string to capitalize.
238- * @return string with the first letter capitalized.
257+ * @returns string with the first letter capitalized.
239258 */
240259std::string Capitalize (std::string str);
241260
0 commit comments