mirror of
https://github.com/jellyfin/jellyfin-plugin-anidb.git
synced 2024-11-23 05:49:41 +00:00
Fix typo
This commit is contained in:
parent
2d0cae5626
commit
69f6bca0df
@ -22,21 +22,21 @@ namespace Jellyfin.Plugin.AniDB.Providers
|
||||
/// Cut p(%) away from the string
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <param name="minLenght"></param>
|
||||
/// <param name="minLength"></param>
|
||||
/// <param name="p"></param>
|
||||
/// <returns></returns>
|
||||
public static string ShortenString(string input, int minLenght = 0, int p = 50)
|
||||
public static string ShortenString(string input, int minLength = 0, int p = 50)
|
||||
{
|
||||
if (input.Length <= minLenght)
|
||||
if (input.Length <= minLength)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
int newLength = (int)((float)input.Length - (((float)input.Length / 100f) * (float)p));
|
||||
|
||||
if (newLength < minLenght)
|
||||
if (newLength < minLength)
|
||||
{
|
||||
newLength = minLenght;
|
||||
newLength = minLength;
|
||||
}
|
||||
|
||||
return input.Substring(0, newLength);
|
||||
|
Loading…
Reference in New Issue
Block a user