Improve error reporting on unexpected HTTP status code

This commit is contained in:
Tyrrrz
2023-07-25 18:59:05 +03:00
parent bcf652edbe
commit ddfbe51cfa
4 changed files with 52 additions and 39 deletions

View File

@@ -16,6 +16,21 @@ public static class StringExtensions
? str[..charCount]
: str;
public static string ToSpaceSeparatedWords(this string str)
{
var builder = new StringBuilder(str.Length * 2);
foreach (var c in str)
{
if (char.IsUpper(c) && builder.Length > 0)
builder.Append(' ');
builder.Append(c);
}
return builder.ToString();
}
public static IEnumerable<Rune> GetRunes(this string str)
{
var lastIndex = 0;