| 2029 | } |
| 2030 | |
| 2031 | bool ASConsole::stringEndsWith(const string &str, const string &suffix) const |
| 2032 | { |
| 2033 | int strIndex = (int) str.length() - 1; |
| 2034 | int suffixIndex = (int) suffix.length() - 1; |
| 2035 | |
| 2036 | while (strIndex >= 0 && suffixIndex >= 0) |
| 2037 | { |
| 2038 | if (tolower(str[strIndex]) != tolower(suffix[suffixIndex])) |
| 2039 | return false; |
| 2040 | |
| 2041 | --strIndex; |
| 2042 | --suffixIndex; |
| 2043 | } |
| 2044 | // suffix longer than string |
| 2045 | if (strIndex < 0 && suffixIndex >= 0) |
| 2046 | return false; |
| 2047 | return true; |
| 2048 | } |
| 2049 | |
| 2050 | // Swap the two low order bytes of an integer value |
| 2051 | // and convert 8 bit encoding to 16 bit. |
nothing calls this directly
no outgoing calls
no test coverage detected