⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 strutil.h

📁 linux下的任天堂模拟器代码。供大家参考。
💻 H
字号:
/*Copyright (C) 2005-2007 Nach, grinvader ( http://www.zsnes.com )This program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseversion 2 as published by the Free Software Foundation.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.*//*This is part of a toolkit used to assist in ZSNES development*/#ifndef STRUTIL_H#define STRUTIL_H#include <string>#include <vector>#include <cctype>struct ci_char_traits : public std::char_traits<char>{  static bool eq(char c1, char c2) { return tolower(c1) == tolower(c2); }  static bool ne(char c1, char c2) { return tolower(c1) != tolower(c2); }  static bool lt(char c1, char c2) { return tolower(c1) < tolower(c2); }  static int compare(const char* s1, const char* s2, size_t n) { return strncasecmp( s1, s2, n ); }  static const char* find( const char* s, int n, char a )  {    while(n-- > 0 && tolower(*s) != tolower(a))    {      ++s;    }    return n >= 0 ? s : 0;  }};typedef std::basic_string<char, ci_char_traits> string_ci;void Tokenize(const std::string&, std::vector<std::string>&, const std::string&);void Tokenize(const string_ci&, std::vector<string_ci>&, const string_ci&);bool all_whitespace(const char *);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -