mirror of https://github.com/FOME-Tech/fome-fw.git
refactoring: tolower
This commit is contained in:
parent
315fc4aff3
commit
6c7001ff08
|
@ -207,17 +207,6 @@ static void removeFile(const char *pathx) {
|
||||||
unlockSpi();
|
unlockSpi();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
** return lower-case of c if upper-case, else c
|
|
||||||
*/
|
|
||||||
int mytolower(const char c) {
|
|
||||||
|
|
||||||
if(c<='Z' && c>='A') return (c+32);
|
|
||||||
return (c);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
mystrncasecmp(const char *s1, const char *s2, size_t n)
|
mystrncasecmp(const char *s1, const char *s2, size_t n)
|
||||||
{
|
{
|
||||||
|
|
|
@ -250,6 +250,13 @@ bool strEqualCaseInsensitive(const char *str1, const char *str2) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** return lower-case of c if upper-case, else c
|
||||||
|
*/
|
||||||
|
int mytolower(const char c) {
|
||||||
|
return TO_LOWER(c);
|
||||||
|
}
|
||||||
|
|
||||||
bool strEqual(const char *str1, const char *str2) {
|
bool strEqual(const char *str1, const char *str2) {
|
||||||
// todo: there must be a standard function?!
|
// todo: there must be a standard function?!
|
||||||
int len1 = strlen(str1);
|
int len1 = strlen(str1);
|
||||||
|
|
Loading…
Reference in New Issue