mirror of
https://github.com/matrix-construct/construct
synced 2024-06-16 08:58:20 +02:00
ircd: Fix bug.
This commit is contained in:
parent
7ed69485c6
commit
1346fdd639
|
@ -524,8 +524,9 @@ inline ircd::string_view
|
|||
ircd::lstrip(string_view str,
|
||||
const string_view &c)
|
||||
{
|
||||
while(startswith(str, c))
|
||||
str = str.substr(size(c));
|
||||
if(c)
|
||||
while(startswith(str, c))
|
||||
str = str.substr(size(c));
|
||||
|
||||
return str;
|
||||
}
|
||||
|
@ -536,8 +537,9 @@ ircd::lstrip(string_view str,
|
|||
const string_view &c,
|
||||
size_t n)
|
||||
{
|
||||
while(startswith(str, c) && n--)
|
||||
str = str.substr(size(c));
|
||||
if(c)
|
||||
while(startswith(str, c) && n--)
|
||||
str = str.substr(size(c));
|
||||
|
||||
return str;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue