ansilove

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

strtolower.c (431B)


      1 /*
      2  * strtolower.c
      3  * Ansilove 4.1.2
      4  * https://www.ansilove.org
      5  *
      6  * Copyright (c) 2011-2020 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 
     13 #include <ctype.h>
     14 #include "strtolower.h"
     15 
     16 char *
     17 strtolower(char *str)
     18 {
     19 	char *p = str;
     20 
     21 	while (*p) {
     22 		*p = tolower((unsigned char)*p);
     23 		p++;
     24 	}
     25 
     26 	return str;
     27 }