ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

strtolower.c (475B)


      1 /*
      2  * strtolower.c
      3  * Ansilove 4.1.6
      4  * https://www.ansilove.org
      5  *
      6  * Copyright (c) 2011-2022 Stefan Vogt, Brian Cassidy, and Frederic Cambus
      7  * All rights reserved.
      8  *
      9  * Ansilove is licensed 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.h"
     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 }