mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-23 07:29:07 -08:00
Support bootconfig
https://android-review.googlesource.com/c/platform/system/core/+/1615298
This commit is contained in:
@@ -188,3 +188,16 @@ string &replace_all(string &str, string_view from, string_view to) {
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
vector<string> split(const string& s, const string& delimiters) {
|
||||
vector<string> result;
|
||||
size_t base = 0;
|
||||
size_t found;
|
||||
while (true) {
|
||||
found = s.find_first_of(delimiters, base);
|
||||
result.push_back(s.substr(base, found - base));
|
||||
if (found == string::npos) break;
|
||||
base = found + 1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user