strtolower.cpp (456B)
1 /* 2 * StatZone 1.1.1 3 * Copyright (c) 2012-2022, Frederic Cambus 4 * https://www.statdns.com 5 * 6 * Created: 2012-02-13 7 * Last Updated: 2019-01-03 8 * 9 * StatZone is released under the BSD 2-Clause license. 10 * See LICENSE file for details. 11 * 12 * SPDX-License-Identifier: BSD-2-Clause 13 */ 14 15 #include <ctype.h> 16 #include "strtolower.hpp" 17 18 char * 19 strtolower(char *str) 20 { 21 char *p = str; 22 23 while (*p) { 24 *p = tolower((unsigned char)*p); 25 p++; 26 } 27 28 return str; 29 }