jellyfin-server/MediaBrowser.Model/ApiClient/ApiHelpers.cs

23 lines
570 B
C#
Raw Normal View History

2014-10-28 23:17:55 +00:00
using System;
namespace MediaBrowser.Model.ApiClient
{
public static class ApiHelpers
{
/// <summary>
/// Gets the name of the slug.
/// </summary>
/// <param name="name">The name.</param>
/// <returns>System.String.</returns>
public static string GetSlugName(string name)
{
if (string.IsNullOrEmpty(name))
{
throw new ArgumentNullException("name");
}
return name.Replace('/', '-').Replace('?', '-').Replace('&', '-');
}
}
}