Skip to content

Commit

Permalink
Made utils internal
Browse files Browse the repository at this point in the history
  • Loading branch information
dusrdev committed Oct 10, 2024
1 parent b1b92b4 commit b896497
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PrettyConsole/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ namespace PrettyConsole;
/// <summary>
/// A static class containing utility methods
/// </summary>
public static class Utils {
internal static class Utils {
/// <summary>
/// Returns a formatted percentage string, i.e 0,5:##0.##%
/// </summary>
/// <param name="percentage"></param>
/// <param name="buffer"></param>
/// <returns></returns>
public static ReadOnlySpan<char> FormatPercentage(double percentage, Span<char> buffer) {
internal static ReadOnlySpan<char> FormatPercentage(double percentage, Span<char> buffer) {
percentage.TryFormat(buffer, out int bytesWritten, "0,5:##0.##%");
return buffer.Slice(0, bytesWritten);
}
Expand All @@ -21,5 +21,5 @@ public static ReadOnlySpan<char> FormatPercentage(double percentage, Span<char>
/// Rents a memory owner from the shared memory pool
/// </summary>
/// <param name="length">The minimum length</param>
public static IMemoryOwner<char> ObtainMemory(int length) => MemoryPool<char>.Shared.Rent(length);
internal static IMemoryOwner<char> ObtainMemory(int length) => MemoryPool<char>.Shared.Rent(length);
}

0 comments on commit b896497

Please sign in to comment.