mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine http server pages. change to 0.9.51
This commit is contained in:
parent
1c02f4551c
commit
4e3fe36ae2
24 changed files with 307 additions and 96 deletions
|
@ -63,6 +63,24 @@ string srs_string_trim_end(string str, string trim_chars)
|
|||
return ret;
|
||||
}
|
||||
|
||||
string srs_string_trim_start(string str, string trim_chars)
|
||||
{
|
||||
std::string ret = str;
|
||||
|
||||
for (int i = 0; i < (int)trim_chars.length(); i++) {
|
||||
char ch = trim_chars.at(i);
|
||||
|
||||
while (!ret.empty() && ret.at(0) == ch) {
|
||||
ret.erase(ret.begin());
|
||||
|
||||
// ok, matched, should reset the search
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
string srs_string_remove(string str, string remove_chars)
|
||||
{
|
||||
std::string ret = str;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue