mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
WriteLine now only issues a single Write call
This commit is contained in:
parent
42121491f0
commit
43660fb633
1 changed files with 7 additions and 5 deletions
|
@ -49,14 +49,14 @@ namespace System.Diagnostics
|
||||||
|
|
||||||
public static void Write(String fmt, params Object[] args)
|
public static void Write(String fmt, params Object[] args)
|
||||||
{
|
{
|
||||||
String str = scope String(256);
|
String str = scope String(4096);
|
||||||
str.AppendF(fmt, params args);
|
str.AppendF(fmt, params args);
|
||||||
Write(str);
|
Write(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Write(Object obj)
|
public static void Write(Object obj)
|
||||||
{
|
{
|
||||||
String str = scope String(256);
|
String str = scope String(4096);
|
||||||
obj.ToString(str);
|
obj.ToString(str);
|
||||||
Write(str);
|
Write(str);
|
||||||
}
|
}
|
||||||
|
@ -68,13 +68,15 @@ namespace System.Diagnostics
|
||||||
|
|
||||||
public static void WriteLine(StringView line)
|
public static void WriteLine(StringView line)
|
||||||
{
|
{
|
||||||
Write(line.Ptr, line.Length);
|
String lineStr = scope String(Math.Min(line.Length, 4096));
|
||||||
Write("\n", 1);
|
lineStr.Append(line);
|
||||||
|
lineStr.Append('\n');
|
||||||
|
Write(lineStr.Ptr, lineStr.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void WriteLine(StringView strFormat, params Object[] args)
|
public static void WriteLine(StringView strFormat, params Object[] args)
|
||||||
{
|
{
|
||||||
String paramStr = scope String();
|
String paramStr = scope String(4096);
|
||||||
paramStr.AppendF(strFormat, params args);
|
paramStr.AppendF(strFormat, params args);
|
||||||
paramStr.Append('\n');
|
paramStr.Append('\n');
|
||||||
Write(paramStr.Ptr, paramStr.Length);
|
Write(paramStr.Ptr, paramStr.Length);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue