/*****************************************************************************/ /* */ /* UNIT: NTL0_lowercase (Level 0 library routine) */ /* */ /* Author: Nikola Stojanovic */ /* */ /* Revision: 27 JUN 94 Version 1.0 */ /* */ /* Function: */ /* */ /* Procedure converts the received string into all lowercase letters */ /* (all non-letter characters remain same as they were). Procedure is */ /* "destructive", i.e. it converts characters in the original buffer and */ /* loses the old contents (original string with uppercase letters, if any) */ /* */ /*****************************************************************************/ #include "ntl0.h" /*****************************************************************************/ void NTL0_lowercase (char *str) { char *scanpos; scanpos = str; while (*scanpos != '\0') { if ((*scanpos >= 'A') && (*scanpos <= 'Z')) *scanpos = *scanpos - 'A' + 'a'; scanpos++; } }