mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-05 22:35:17 -04:00
OPDS Enhancements, Epub fixes, and a lot more (#4035)
Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com> Co-authored-by: Robbie Davis <robbie@therobbiedavis.com> Co-authored-by: Fabian Pammer <fpammer@mantro.net> Co-authored-by: Vinícius Licz <vinilicz@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace API.Extensions;
|
||||
@@ -81,4 +82,15 @@ public static class StringExtensions
|
||||
return input[0] + new string('*', atIdx - 1) + input[atIdx..];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Repeat returns a string that is equal to the original string repeat n times
|
||||
/// </summary>
|
||||
/// <param name="input">String to repeat</param>
|
||||
/// <param name="n">Amount of times to repeat</param>
|
||||
/// <returns></returns>
|
||||
public static string Repeat(this string? input, int n)
|
||||
{
|
||||
return string.IsNullOrEmpty(input) ? string.Empty : string.Concat(Enumerable.Repeat(input, n));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user