/*****************************************************************************/ /* pemagination: a (virtual) tour into portable bits and executable bytes */ /* Copyright (C) 2013,2014,2015 Z. Gilboa */ /* Released under GPLv2 and GPLv3; see COPYING.PEMAGINE. */ /*****************************************************************************/ #include #include #include "pe_impl.h" int32_t pe_impl_strlen_ansi(const char * str) { const char * ch; const char * upper_bound; upper_bound = str + PE_STR_MAX_SYMBOL_LEN_ALLOWED; for (ch=str; *ch && ch= 'A') && (c <= 'Z')) return c + 'a' - 'A'; else return c; }