mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
Implemented some sys_prx syscalls
Fixed vm::ptr Conflicts: Utilities/BEType.h Utilities/StrFmt.cpp rpcs3/Emu/Memory/vm_ptr.h rpcs3/Emu/SysCalls/lv2/sys_prx.cpp rpcs3/Emu/SysCalls/lv2/sys_prx.h Cherry-picked commit "Implemented some sys_prx syscalls"
This commit is contained in:
parent
b84d831d8f
commit
39e679806b
10 changed files with 273 additions and 172 deletions
|
@ -208,49 +208,6 @@ std::vector<std::string> fmt::split(const std::string& source, std::initializer_
|
|||
return std::move(result);
|
||||
}
|
||||
|
||||
std::string fmt::merge(std::vector<std::string> source, const std::string& separator)
|
||||
{
|
||||
if (!source.size())
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string result;
|
||||
|
||||
for (int i = 0; i < source.size() - 1; ++i)
|
||||
{
|
||||
result += source[i] + separator;
|
||||
}
|
||||
|
||||
return result + source.back();
|
||||
}
|
||||
|
||||
std::string fmt::merge(std::initializer_list<std::vector<std::string>> sources, const std::string& separator)
|
||||
{
|
||||
if (!sources.size())
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string result;
|
||||
bool first = true;
|
||||
|
||||
for (auto &v : sources)
|
||||
{
|
||||
if (first)
|
||||
{
|
||||
result = fmt::merge(v, separator);
|
||||
first = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
result += separator + fmt::merge(v, separator);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string fmt::tolower(std::string source)
|
||||
{
|
||||
std::transform(source.begin(), source.end(), source.begin(), ::tolower);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue