Update to v091r11 release.
byuu says:
This release refines HSU1 support as a bidirectional protocol, nests SFC
manifests as "release/cartridge" and "release/information" (but release/
is not guaranteed to be finalized just yet), removes the database
integration, and adds support for ananke.
ananke represents inevitability. It's a library that, when installed,
higan can use to load files from the command-line, and also from a new
File -> Load Game menu option.
I need to change the build rules a bit for it to work on Windows (need
to make phoenix a DLL, basically), but it works now on Linux.
Right now, it only takes *.sfc file names, looks them up in the included
database, converts them to game folders, and returns the game folder
path for higan to load.
The idea is to continue expanding it to support everything we can that
I don't want in the higan core:
- load *.sfc, *.smc, *.swc, *.fig files
- remove SNES copier headers
- split apart merged firmware files
- pull in external firmware files (eg dsp1b.rom - these are staying
merged, just as SPC7110 prg+dat are merged)
- load *.zip and *.7z archives
- prompt for selection on multi-file archives
- generate manifest files based on heuristics
- apply BPS patches
The "Load" menu option has been renamed to "Library", to represent games
in your library. I'm going to add some sort of suffix to indicate
unverified games, and use a different folder icon for those (eg
manifests built on heuristics rather than from the database.)
So basically, to future end users:
File -> Load Game will be how they play games.
Library -> (specific system) can be thought of as an infinitely-sized
recent games list.
purify will likely become a simple stub that invokes ananke's functions.
No reason to duplicate all that code.
2012-11-05 08:22:50 +00:00
|
|
|
#ifdef NALL_STRING_INTERNAL_HPP
|
|
|
|
|
|
|
|
namespace nall {
|
|
|
|
|
|
|
|
unsigned string::length() const { return strlen(data); }
|
|
|
|
unsigned string::capacity() const { return size; }
|
|
|
|
|
|
|
|
template<unsigned limit> lstring string::split(const char *key) const { lstring result; result.split<limit>(key, data); return result; }
|
|
|
|
template<unsigned limit> lstring string::isplit(const char *key) const { lstring result; result.isplit<limit>(key, data); return result; }
|
|
|
|
template<unsigned limit> lstring string::qsplit(const char *key) const { lstring result; result.qsplit<limit>(key, data); return result; }
|
|
|
|
template<unsigned limit> lstring string::iqsplit(const char *key) const { lstring result; result.iqsplit<limit>(key, data); return result; }
|
|
|
|
|
|
|
|
bool string::equals(const char *str) const { return !strcmp(data, str); }
|
|
|
|
bool string::iequals(const char *str) const { return !istrcmp(data, str); }
|
|
|
|
|
|
|
|
bool string::wildcard(const char *str) const { return nall::wildcard(data, str); }
|
|
|
|
bool string::iwildcard(const char *str) const { return nall::iwildcard(data, str); }
|
|
|
|
|
|
|
|
bool string::beginswith(const char *str) const { return strbegin(data, str); }
|
|
|
|
bool string::ibeginswith(const char *str) const { return istrbegin(data, str); }
|
|
|
|
|
|
|
|
bool string::endswith(const char *str) const { return strend(data, str); }
|
|
|
|
bool string::iendswith(const char *str) const { return istrend(data, str); }
|
|
|
|
|
|
|
|
string& string::lower() { nall::strlower(data); return *this; }
|
|
|
|
string& string::upper() { nall::strupper(data); return *this; }
|
|
|
|
string& string::qlower() { nall::qstrlower(data); return *this; }
|
|
|
|
string& string::qupper() { nall::qstrupper(data); return *this; }
|
|
|
|
string& string::transform(const char *before, const char *after) { nall::strtr(data, before, after); return *this; }
|
2013-01-17 11:14:58 +00:00
|
|
|
string& string::reverse() {
|
|
|
|
unsigned length = strlen(data), pivot = length >> 1;
|
|
|
|
for(signed x = 0, y = length - 1; x < pivot && y >= 0; x++, y--) std::swap(data[x], data[y]);
|
|
|
|
return *this;
|
|
|
|
}
|
Update to v091r11 release.
byuu says:
This release refines HSU1 support as a bidirectional protocol, nests SFC
manifests as "release/cartridge" and "release/information" (but release/
is not guaranteed to be finalized just yet), removes the database
integration, and adds support for ananke.
ananke represents inevitability. It's a library that, when installed,
higan can use to load files from the command-line, and also from a new
File -> Load Game menu option.
I need to change the build rules a bit for it to work on Windows (need
to make phoenix a DLL, basically), but it works now on Linux.
Right now, it only takes *.sfc file names, looks them up in the included
database, converts them to game folders, and returns the game folder
path for higan to load.
The idea is to continue expanding it to support everything we can that
I don't want in the higan core:
- load *.sfc, *.smc, *.swc, *.fig files
- remove SNES copier headers
- split apart merged firmware files
- pull in external firmware files (eg dsp1b.rom - these are staying
merged, just as SPC7110 prg+dat are merged)
- load *.zip and *.7z archives
- prompt for selection on multi-file archives
- generate manifest files based on heuristics
- apply BPS patches
The "Load" menu option has been renamed to "Library", to represent games
in your library. I'm going to add some sort of suffix to indicate
unverified games, and use a different folder icon for those (eg
manifests built on heuristics rather than from the database.)
So basically, to future end users:
File -> Load Game will be how they play games.
Library -> (specific system) can be thought of as an infinitely-sized
recent games list.
purify will likely become a simple stub that invokes ananke's functions.
No reason to duplicate all that code.
2012-11-05 08:22:50 +00:00
|
|
|
|
|
|
|
template<unsigned limit> string& string::ltrim(const char *key) { nall::ltrim<limit>(data, key); return *this; }
|
|
|
|
template<unsigned limit> string& string::rtrim(const char *key) { nall::rtrim<limit>(data, key); return *this; }
|
|
|
|
template<unsigned limit> string& string::trim(const char *key, const char *rkey) { nall::trim <limit>(data, key, rkey); return *this; }
|
|
|
|
string& string::strip() { nall::strip(data); return *this; }
|
|
|
|
|
|
|
|
optional<unsigned> string::position(const char *key) const { return strpos(data, key); }
|
|
|
|
optional<unsigned> string::iposition(const char *key) const { return istrpos(data, key); }
|
|
|
|
optional<unsigned> string::qposition(const char *key) const { return qstrpos(data, key); }
|
|
|
|
optional<unsigned> string::iqposition(const char *key) const { return iqstrpos(data, key); }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|